@kingstinct/react-native-healthkit 4.1.1 → 4.4.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 +1 -1
- package/ios/ReactNativeHealthkit.m +15 -10
- package/ios/ReactNativeHealthkit.swift +365 -177
- package/lib/commonjs/index.ios.js +104 -106
- package/lib/commonjs/index.ios.js.map +1 -1
- package/lib/commonjs/index.js +11 -10
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/native-types.js +25 -1
- package/lib/commonjs/native-types.js.map +1 -1
- package/lib/commonjs/types.js +4 -0
- package/lib/commonjs/types.js.map +1 -1
- package/lib/example/App.js +197 -0
- package/lib/index.ios.js +310 -0
- package/lib/index.js +44 -0
- package/lib/module/index.ios.js +104 -106
- package/lib/module/index.ios.js.map +1 -1
- package/lib/module/index.js +4 -3
- package/lib/module/index.js.map +1 -1
- package/lib/module/native-types.js +20 -1
- package/lib/module/native-types.js.map +1 -1
- package/lib/module/types.js +1 -1
- package/lib/module/types.js.map +1 -1
- package/lib/native-types.js +447 -0
- package/lib/src/index.ios.js +314 -0
- package/lib/src/index.js +45 -0
- package/lib/src/native-types.js +453 -0
- package/lib/src/types.js +1 -0
- package/lib/types.js +1 -0
- package/lib/typescript/src/index.d.ts +1 -1
- package/lib/typescript/src/index.ios.d.ts +1 -1
- package/lib/typescript/src/native-types.d.ts +142 -108
- package/lib/typescript/src/types.d.ts +80 -78
- package/package.json +25 -39
- package/src/index.ios.tsx +260 -264
- package/src/index.tsx +14 -13
- package/src/native-types.ts +213 -179
- package/src/types.ts +106 -100
- package/ios/ReactNativeHealthkit.xcodeproj/project.xcworkspace/contents.xcworkspacedata +0 -4
- package/ios/ReactNativeHealthkit.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +0 -8
- package/ios/ReactNativeHealthkit.xcodeproj/project.xcworkspace/xcuserdata/robertherber.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
- package/ios/ReactNativeHealthkit.xcodeproj/xcuserdata/robertherber.xcuserdatad/xcschemes/xcschememanagement.plist +0 -14
|
@@ -1,9 +1,12 @@
|
|
|
1
|
-
import { NativeEventEmitter
|
|
2
|
-
|
|
3
|
-
export declare
|
|
4
|
-
export declare
|
|
1
|
+
import { NativeEventEmitter } from 'react-native';
|
|
2
|
+
import type { EmitterSubscription } from 'react-native';
|
|
3
|
+
export declare const HKWorkoutTypeIdentifier = "HKWorkoutTypeIdentifier";
|
|
4
|
+
export declare const HKAudiogramTypeIdentifier = "HKAudiogramTypeIdentifier";
|
|
5
|
+
export declare const HKWorkoutRouteTypeIdentifier = "HKWorkoutRouteTypeIdentifier";
|
|
6
|
+
export declare const HKDataTypeIdentifierHeartbeatSeries = "HKDataTypeIdentifierHeartbeatSeries";
|
|
7
|
+
export declare type HKSampleTypeIdentifier = HKCategoryTypeIdentifier | HKCorrelationTypeIdentifier | HKQuantityTypeIdentifier | typeof HKAudiogramTypeIdentifier | typeof HKDataTypeIdentifierHeartbeatSeries | typeof HKWorkoutRouteTypeIdentifier | typeof HKWorkoutTypeIdentifier;
|
|
5
8
|
export declare type TypeToUnitMapping = {
|
|
6
|
-
[key in HKQuantityTypeIdentifier]: HKUnit;
|
|
9
|
+
readonly [key in HKQuantityTypeIdentifier]: HKUnit;
|
|
7
10
|
};
|
|
8
11
|
export declare enum HKHeartRateMotionContext {
|
|
9
12
|
active = 2,
|
|
@@ -109,21 +112,21 @@ export declare enum HKWorkoutActivityType {
|
|
|
109
112
|
other = 3000
|
|
110
113
|
}
|
|
111
114
|
export declare type HKGenericMetadata = {
|
|
112
|
-
[key: string]:
|
|
113
|
-
HKExternalUUID?: string;
|
|
114
|
-
HKTimeZone?: string;
|
|
115
|
-
HKWasUserEntered?: boolean;
|
|
116
|
-
HKDeviceSerialNumber?: string;
|
|
117
|
-
HKUDIDeviceIdentifier?: string;
|
|
118
|
-
HKUDIProductionIdentifier?: string;
|
|
119
|
-
HKDigitalSignature?: string;
|
|
120
|
-
HKDeviceName?: string;
|
|
121
|
-
HKDeviceManufacturerName?: string;
|
|
122
|
-
HKSyncIdentifier?: string;
|
|
123
|
-
HKSyncVersion?: number;
|
|
124
|
-
HKWasTakenInLab?: boolean;
|
|
125
|
-
HKReferenceRangeLowerLimit?: number;
|
|
126
|
-
HKReferenceRangeUpperLimit?: number;
|
|
115
|
+
readonly [key: string]: HKQuantity | boolean | number | string | undefined;
|
|
116
|
+
readonly HKExternalUUID?: string;
|
|
117
|
+
readonly HKTimeZone?: string;
|
|
118
|
+
readonly HKWasUserEntered?: boolean;
|
|
119
|
+
readonly HKDeviceSerialNumber?: string;
|
|
120
|
+
readonly HKUDIDeviceIdentifier?: string;
|
|
121
|
+
readonly HKUDIProductionIdentifier?: string;
|
|
122
|
+
readonly HKDigitalSignature?: string;
|
|
123
|
+
readonly HKDeviceName?: string;
|
|
124
|
+
readonly HKDeviceManufacturerName?: string;
|
|
125
|
+
readonly HKSyncIdentifier?: string;
|
|
126
|
+
readonly HKSyncVersion?: number;
|
|
127
|
+
readonly HKWasTakenInLab?: boolean;
|
|
128
|
+
readonly HKReferenceRangeLowerLimit?: number;
|
|
129
|
+
readonly HKReferenceRangeUpperLimit?: number;
|
|
127
130
|
};
|
|
128
131
|
export declare enum HKWeatherCondition {
|
|
129
132
|
none = 0,
|
|
@@ -156,8 +159,8 @@ export declare enum HKWeatherCondition {
|
|
|
156
159
|
tornado = 27
|
|
157
160
|
}
|
|
158
161
|
export interface HKWorkoutMetadata extends HKGenericMetadata {
|
|
159
|
-
HKWeatherCondition?: HKWeatherCondition;
|
|
160
|
-
HKWeatherHumidity?: HKQuantity<HKUnit.Percent>;
|
|
162
|
+
readonly HKWeatherCondition?: HKWeatherCondition;
|
|
163
|
+
readonly HKWeatherHumidity?: HKQuantity<HKUnit.Percent>;
|
|
161
164
|
}
|
|
162
165
|
export declare enum HKQuantityTypeIdentifier {
|
|
163
166
|
bodyMassIndex = "HKQuantityTypeIdentifierBodyMassIndex",
|
|
@@ -242,6 +245,13 @@ export declare enum HKQuantityTypeIdentifier {
|
|
|
242
245
|
dietaryPotassium = "HKQuantityTypeIdentifierDietaryPotassium",
|
|
243
246
|
dietaryCaffeine = "HKQuantityTypeIdentifierDietaryCaffeine",
|
|
244
247
|
dietaryWater = "HKQuantityTypeIdentifierDietaryWater",
|
|
248
|
+
sixMinuteWalkTestDistance = "HKQuantityTypeIdentifierSixMinuteWalkTestDistance",
|
|
249
|
+
walkingSpeed = "HKQuantityTypeIdentifierWalkingSpeed",
|
|
250
|
+
walkingStepLength = "HKQuantityTypeIdentifierWalkingStepLength",
|
|
251
|
+
walkingAsymmetryPercentage = "HKQuantityTypeIdentifierWalkingAsymmetryPercentage",
|
|
252
|
+
walkingDoubleSupportPercentage = "HKQuantityTypeIdentifierWalkingDoubleSupportPercentage",
|
|
253
|
+
stairAscentSpeed = "HKQuantityTypeIdentifierStairAscentSpeed",
|
|
254
|
+
stairDescentSpeed = "HKQuantityTypeIdentifierStairDescentSpeed",
|
|
245
255
|
uvExposure = "HKQuantityTypeIdentifierUvExposure"
|
|
246
256
|
}
|
|
247
257
|
export declare enum HKAuthorizationRequestStatus {
|
|
@@ -249,9 +259,14 @@ export declare enum HKAuthorizationRequestStatus {
|
|
|
249
259
|
shouldRequest = 1,
|
|
250
260
|
unnecessary = 2
|
|
251
261
|
}
|
|
262
|
+
export declare enum HKAuthorizationStatus {
|
|
263
|
+
notDetermined = 0,
|
|
264
|
+
sharingDenied = 1,
|
|
265
|
+
sharingAuthorized = 2
|
|
266
|
+
}
|
|
252
267
|
export declare type HKQuantity<T extends HKUnit = HKUnit> = {
|
|
253
|
-
unit: T;
|
|
254
|
-
quantity: number;
|
|
268
|
+
readonly unit: T;
|
|
269
|
+
readonly quantity: number;
|
|
255
270
|
};
|
|
256
271
|
export declare enum HKBloodType {
|
|
257
272
|
notSet = 0,
|
|
@@ -290,16 +305,16 @@ export declare enum HKStatisticsOptions {
|
|
|
290
305
|
separateBySource = "separateBySource"
|
|
291
306
|
}
|
|
292
307
|
export declare type QueryStatisticsResponseRaw<TUnit extends HKUnit = HKUnit> = {
|
|
293
|
-
averageQuantity?: HKQuantity<TUnit>;
|
|
294
|
-
maximumQuantity?: HKQuantity<TUnit>;
|
|
295
|
-
minimumQuantity?: HKQuantity<TUnit>;
|
|
296
|
-
sumQuantity?: HKQuantity<TUnit>;
|
|
297
|
-
mostRecentQuantity?: HKQuantity<TUnit>;
|
|
298
|
-
mostRecentQuantityDateInterval?: {
|
|
299
|
-
from: string;
|
|
300
|
-
to: string;
|
|
308
|
+
readonly averageQuantity?: HKQuantity<TUnit>;
|
|
309
|
+
readonly maximumQuantity?: HKQuantity<TUnit>;
|
|
310
|
+
readonly minimumQuantity?: HKQuantity<TUnit>;
|
|
311
|
+
readonly sumQuantity?: HKQuantity<TUnit>;
|
|
312
|
+
readonly mostRecentQuantity?: HKQuantity<TUnit>;
|
|
313
|
+
readonly mostRecentQuantityDateInterval?: {
|
|
314
|
+
readonly from: string;
|
|
315
|
+
readonly to: string;
|
|
301
316
|
};
|
|
302
|
-
duration?: HKQuantity<HKUnit.Seconds>;
|
|
317
|
+
readonly duration?: HKQuantity<HKUnit.Seconds>;
|
|
303
318
|
};
|
|
304
319
|
export declare enum HKCategoryValueCervicalMucusQuality {
|
|
305
320
|
dry = 1,
|
|
@@ -346,26 +361,26 @@ export declare enum HKCategoryValueSeverity {
|
|
|
346
361
|
export declare enum HKCategoryValueNotApplicable {
|
|
347
362
|
notApplicable = 0
|
|
348
363
|
}
|
|
349
|
-
export declare type HKCategoryValue = HKCategoryValueAppetiteChanges |
|
|
364
|
+
export declare type HKCategoryValue = HKCategoryValueAppetiteChanges | HKCategoryValueCervicalMucusQuality | HKCategoryValueMenstrualFlow | HKCategoryValueOvulationTestResult | HKCategoryValuePresence | HKCategoryValuePresence | HKCategoryValueSeverity | HKCategoryValueSleepAnalysis | number;
|
|
350
365
|
export declare enum HKInsulinDeliveryReason {
|
|
351
366
|
basal = 1,
|
|
352
367
|
bolus = 2
|
|
353
368
|
}
|
|
354
369
|
export declare type MetadataMapperForQuantityIdentifier<TQuantityTypeIdentifier = HKQuantityTypeIdentifier> = TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.insulinDelivery ? HKGenericMetadata & {
|
|
355
|
-
HKInsulinDeliveryReason: HKInsulinDeliveryReason;
|
|
370
|
+
readonly HKInsulinDeliveryReason: HKInsulinDeliveryReason;
|
|
356
371
|
} : TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.bloodGlucose ? HKGenericMetadata & {
|
|
357
|
-
HKBloodGlucoseMealTime?: number;
|
|
372
|
+
readonly HKBloodGlucoseMealTime?: number;
|
|
358
373
|
} : TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.heartRate ? HKGenericMetadata & {
|
|
359
|
-
HKHeartRateMotionContext?: HKHeartRateMotionContext;
|
|
374
|
+
readonly HKHeartRateMotionContext?: HKHeartRateMotionContext;
|
|
360
375
|
} : HKGenericMetadata;
|
|
361
376
|
export declare type MetadataMapperForCorrelationIdentifier<TCorrelationTypeIdentifier = HKCorrelationTypeIdentifier> = TCorrelationTypeIdentifier extends HKCorrelationTypeIdentifier.food ? HKGenericMetadata & {
|
|
362
|
-
HKFoodType?: string;
|
|
377
|
+
readonly HKFoodType?: string;
|
|
363
378
|
} : HKGenericMetadata;
|
|
364
379
|
export declare type HKCategoryValueForIdentifier<T extends HKCategoryTypeIdentifier> = T extends HKCategoryTypeIdentifier.cervicalMucusQuality ? HKCategoryValueCervicalMucusQuality : T extends HKCategoryTypeIdentifier.menstrualFlow ? HKCategoryValueMenstrualFlow : T extends HKCategoryTypeIdentifier.ovulationTestResult ? HKCategoryValueOvulationTestResult : T extends HKCategoryTypeIdentifier.sleepAnalysis ? HKCategoryValueSleepAnalysis : T extends HKCategoryTypeIdentifier.mindfulSession ? HKCategoryValueNotApplicable : T extends HKCategoryTypeIdentifier.intermenstrualBleeding ? HKCategoryValueNotApplicable : T extends HKCategoryTypeIdentifier.highHeartRateEvent ? HKCategoryValueNotApplicable : T extends HKCategoryTypeIdentifier.sexualActivity ? HKCategoryValueNotApplicable : T extends HKCategoryTypeIdentifier.appleStandHour ? HKCategoryValueAppleStandHour : number;
|
|
365
380
|
export declare type MetadataMapperForCategoryIdentifier<T extends HKCategoryTypeIdentifier> = T extends HKCategoryTypeIdentifier.sexualActivity ? HKGenericMetadata & {
|
|
366
|
-
HKSexualActivityProtectionUsed: boolean;
|
|
381
|
+
readonly HKSexualActivityProtectionUsed: boolean;
|
|
367
382
|
} : T extends HKCategoryTypeIdentifier.menstrualFlow ? HKGenericMetadata & {
|
|
368
|
-
HKMenstrualCycleStart: boolean;
|
|
383
|
+
readonly HKMenstrualCycleStart: boolean;
|
|
369
384
|
} : HKGenericMetadata;
|
|
370
385
|
export declare enum HKWheelchairUse {
|
|
371
386
|
notSet = 0,
|
|
@@ -439,46 +454,48 @@ export declare enum HKUnit {
|
|
|
439
454
|
GlucoseMgPerDl = "mg/dL"
|
|
440
455
|
}
|
|
441
456
|
export declare type HKDevice = {
|
|
442
|
-
name: string;
|
|
443
|
-
firmwareVersion: string;
|
|
444
|
-
hardwareVersion: string;
|
|
445
|
-
localIdentifier: string;
|
|
446
|
-
manufacturer: string;
|
|
447
|
-
model: string;
|
|
448
|
-
softwareVersion: string;
|
|
457
|
+
readonly name: string;
|
|
458
|
+
readonly firmwareVersion: string;
|
|
459
|
+
readonly hardwareVersion: string;
|
|
460
|
+
readonly localIdentifier: string;
|
|
461
|
+
readonly manufacturer: string;
|
|
462
|
+
readonly model: string;
|
|
463
|
+
readonly softwareVersion: string;
|
|
449
464
|
};
|
|
450
465
|
export declare type HKSource = {
|
|
451
|
-
name: string;
|
|
452
|
-
bundleIdentifier: string;
|
|
466
|
+
readonly name: string;
|
|
467
|
+
readonly bundleIdentifier: string;
|
|
453
468
|
};
|
|
454
469
|
export declare type HKSourceRevision = {
|
|
455
|
-
source: HKSource;
|
|
456
|
-
version: string;
|
|
457
|
-
operatingSystemVersion?: string;
|
|
458
|
-
productType?: string;
|
|
470
|
+
readonly source: HKSource;
|
|
471
|
+
readonly version: string;
|
|
472
|
+
readonly operatingSystemVersion?: string;
|
|
473
|
+
readonly productType?: string;
|
|
459
474
|
};
|
|
460
475
|
export declare type HKQuantitySampleRaw<TQuantityIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier, TUnit extends HKUnit = HKUnit> = {
|
|
461
|
-
uuid: string;
|
|
462
|
-
device?: HKDevice;
|
|
463
|
-
quantityType: TQuantityIdentifier;
|
|
464
|
-
startDate: string;
|
|
465
|
-
endDate: string;
|
|
466
|
-
quantity: number;
|
|
467
|
-
unit: TUnit;
|
|
468
|
-
metadata: MetadataMapperForQuantityIdentifier<TQuantityIdentifier>;
|
|
469
|
-
sourceRevision?: HKSourceRevision;
|
|
476
|
+
readonly uuid: string;
|
|
477
|
+
readonly device?: HKDevice;
|
|
478
|
+
readonly quantityType: TQuantityIdentifier;
|
|
479
|
+
readonly startDate: string;
|
|
480
|
+
readonly endDate: string;
|
|
481
|
+
readonly quantity: number;
|
|
482
|
+
readonly unit: TUnit;
|
|
483
|
+
readonly metadata: MetadataMapperForQuantityIdentifier<TQuantityIdentifier>;
|
|
484
|
+
readonly sourceRevision?: HKSourceRevision;
|
|
470
485
|
};
|
|
471
486
|
export declare type HKWorkoutRaw<TEnergy extends HKUnit, TDistance extends HKUnit> = {
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
487
|
+
readonly uuid: string;
|
|
488
|
+
readonly device?: HKDevice;
|
|
489
|
+
readonly workoutActivityType: HKWorkoutActivityType;
|
|
490
|
+
readonly duration: number;
|
|
491
|
+
readonly totalDistance?: HKQuantity<TDistance>;
|
|
492
|
+
readonly totalEnergyBurned?: HKQuantity<TEnergy>;
|
|
493
|
+
readonly totalSwimmingStrokeCount?: HKQuantity<HKUnit.Count>;
|
|
494
|
+
readonly totalFlightsClimbed?: HKQuantity<HKUnit.Count>;
|
|
495
|
+
readonly startDate: string;
|
|
496
|
+
readonly endDate: string;
|
|
497
|
+
readonly metadata?: HKWorkoutMetadata;
|
|
498
|
+
readonly sourceRevision?: HKSourceRevision;
|
|
482
499
|
};
|
|
483
500
|
export declare enum HKCharacteristicTypeIdentifier {
|
|
484
501
|
fitzpatrickSkinType = "HKCharacteristicTypeIdentifierFitzpatrickSkinType",
|
|
@@ -487,28 +504,28 @@ export declare enum HKCharacteristicTypeIdentifier {
|
|
|
487
504
|
dateOfBirth = "HKCharacteristicTypeIdentifierDateOfBirth",
|
|
488
505
|
wheelchairUse = "HKCharacteristicTypeIdentifierWheelchairUse"
|
|
489
506
|
}
|
|
490
|
-
export declare type
|
|
491
|
-
[key in
|
|
507
|
+
export declare type WritePermissions = {
|
|
508
|
+
readonly [key in HKCategoryTypeIdentifier | HKCharacteristicTypeIdentifier | HKQuantityTypeIdentifier]: boolean;
|
|
492
509
|
};
|
|
493
|
-
export declare type
|
|
494
|
-
[key in
|
|
510
|
+
export declare type ReadPermissions = {
|
|
511
|
+
readonly [key in HKCategoryTypeIdentifier | HKCharacteristicTypeIdentifier | HKQuantityTypeIdentifier]: boolean;
|
|
495
512
|
};
|
|
496
513
|
export declare type HKCategorySampleRaw<T extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier> = {
|
|
497
|
-
uuid: string;
|
|
498
|
-
device?: HKDevice;
|
|
499
|
-
categoryType: T;
|
|
500
|
-
startDate: string;
|
|
501
|
-
endDate: string;
|
|
502
|
-
value: HKCategoryValueForIdentifier<T>;
|
|
503
|
-
metadata: MetadataMapperForCategoryIdentifier<T>;
|
|
504
|
-
sourceRevision?: HKSourceRevision;
|
|
514
|
+
readonly uuid: string;
|
|
515
|
+
readonly device?: HKDevice;
|
|
516
|
+
readonly categoryType: T;
|
|
517
|
+
readonly startDate: string;
|
|
518
|
+
readonly endDate: string;
|
|
519
|
+
readonly value: HKCategoryValueForIdentifier<T>;
|
|
520
|
+
readonly metadata: MetadataMapperForCategoryIdentifier<T>;
|
|
521
|
+
readonly sourceRevision?: HKSourceRevision;
|
|
505
522
|
};
|
|
506
523
|
export declare type HKCorrelationRaw<TIdentifier extends HKCorrelationTypeIdentifier> = {
|
|
507
|
-
correlationType: HKCorrelationTypeIdentifier;
|
|
508
|
-
objects: (
|
|
509
|
-
metadata: MetadataMapperForCorrelationIdentifier<TIdentifier>;
|
|
510
|
-
startDate: string;
|
|
511
|
-
endDate: string;
|
|
524
|
+
readonly correlationType: HKCorrelationTypeIdentifier;
|
|
525
|
+
readonly objects: readonly (HKCategorySampleRaw | HKQuantitySampleRaw)[];
|
|
526
|
+
readonly metadata: MetadataMapperForCorrelationIdentifier<TIdentifier>;
|
|
527
|
+
readonly startDate: string;
|
|
528
|
+
readonly endDate: string;
|
|
512
529
|
};
|
|
513
530
|
declare type QueryId = string;
|
|
514
531
|
export declare enum HKCorrelationTypeIdentifier {
|
|
@@ -521,38 +538,55 @@ export declare enum HKUpdateFrequency {
|
|
|
521
538
|
daily = 3,
|
|
522
539
|
weekly = 4
|
|
523
540
|
}
|
|
541
|
+
export declare type WorkoutLocation = {
|
|
542
|
+
readonly longitude: number;
|
|
543
|
+
readonly latitude: number;
|
|
544
|
+
readonly altitude: number;
|
|
545
|
+
readonly speed: number;
|
|
546
|
+
readonly timestamp: number;
|
|
547
|
+
readonly horizontalAccuracy: number;
|
|
548
|
+
readonly speedAccuracy: number;
|
|
549
|
+
readonly verticalAccuracy: number;
|
|
550
|
+
};
|
|
551
|
+
export declare type WorkoutRoute = {
|
|
552
|
+
readonly locations: readonly WorkoutLocation[];
|
|
553
|
+
readonly HKMetadataKeySyncIdentifier?: string;
|
|
554
|
+
readonly HKMetadataKeySyncVersion?: number;
|
|
555
|
+
};
|
|
556
|
+
declare type AuthorizationStatusFor = HKCharacteristicTypeIdentifier | HKSampleTypeIdentifier;
|
|
524
557
|
declare type ReactNativeHealthkitTypeNative = {
|
|
525
558
|
isHealthDataAvailable(): Promise<boolean>;
|
|
526
559
|
getBloodType(): Promise<HKBloodType>;
|
|
527
560
|
getDateOfBirth(): Promise<string>;
|
|
528
561
|
getBiologicalSex(): Promise<HKBiologicalSex>;
|
|
529
562
|
getFitzpatrickSkinType(): Promise<HKFitzpatrickSkinType>;
|
|
530
|
-
getWheelchairUse: () => Promise<HKWheelchairUse>;
|
|
531
|
-
enableBackgroundDelivery: (typeIdentifier: HKSampleTypeIdentifier, updateFrequency: HKUpdateFrequency) => Promise<boolean>;
|
|
532
|
-
disableBackgroundDelivery: (typeIdentifier: HKSampleTypeIdentifier) => Promise<boolean>;
|
|
533
|
-
disableAllBackgroundDelivery: () => Promise<boolean>;
|
|
534
|
-
saveCorrelationSample: <TIdentifier extends HKCorrelationTypeIdentifier>(typeIdentifier: TIdentifier, samples: Omit<
|
|
535
|
-
saveWorkoutSample: (typeIdentifier: HKWorkoutActivityType, quantities: Omit<HKQuantitySampleRaw, '
|
|
536
|
-
queryCorrelationSamples: <TIdentifier extends HKCorrelationTypeIdentifier>(typeIdentifier: TIdentifier, from: string, to: string) => Promise<HKCorrelationRaw<TIdentifier>[]>;
|
|
563
|
+
readonly getWheelchairUse: () => Promise<HKWheelchairUse>;
|
|
564
|
+
readonly enableBackgroundDelivery: (typeIdentifier: HKSampleTypeIdentifier, updateFrequency: HKUpdateFrequency) => Promise<boolean>;
|
|
565
|
+
readonly disableBackgroundDelivery: (typeIdentifier: HKSampleTypeIdentifier) => Promise<boolean>;
|
|
566
|
+
readonly disableAllBackgroundDelivery: () => Promise<boolean>;
|
|
567
|
+
readonly saveCorrelationSample: <TIdentifier extends HKCorrelationTypeIdentifier>(typeIdentifier: TIdentifier, samples: readonly Omit<HKCategorySampleRaw | HKQuantitySampleRaw, 'device' | 'endDate' | 'startDate' | 'uuid'>[], start: string, end: string, metadata: MetadataMapperForCorrelationIdentifier<TIdentifier>) => Promise<boolean>;
|
|
568
|
+
readonly saveWorkoutSample: (typeIdentifier: HKWorkoutActivityType, quantities: readonly Omit<HKQuantitySampleRaw, 'device' | 'endDate' | 'startDate' | 'uuid'>[], start: string, end: string, metadata: HKWorkoutMetadata) => Promise<boolean>;
|
|
569
|
+
readonly queryCorrelationSamples: <TIdentifier extends HKCorrelationTypeIdentifier>(typeIdentifier: TIdentifier, from: string, to: string) => Promise<readonly HKCorrelationRaw<TIdentifier>[]>;
|
|
537
570
|
subscribeToObserverQuery(identifier: HKSampleTypeIdentifier): Promise<QueryId>;
|
|
538
571
|
unsubscribeQuery(queryId: QueryId): Promise<boolean>;
|
|
539
|
-
authorizationStatusFor(type:
|
|
540
|
-
getRequestStatusForAuthorization(write:
|
|
541
|
-
requestAuthorization(write:
|
|
542
|
-
saveQuantitySample: (identifier: HKQuantityTypeIdentifier, unit: HKUnit, value: number, start: string, end: string, metadata:
|
|
543
|
-
queryWorkoutSamples: <TEnergy extends HKUnit, TDistance extends HKUnit>(energyUnit: TEnergy, distanceUnit: TDistance, from: string, to: string, limit:
|
|
544
|
-
queryCategorySamples: <T extends HKCategoryTypeIdentifier>(identifier: T, from: string, to: string, limit:
|
|
545
|
-
queryQuantitySamples: <TUnit extends HKUnit, TIdentifier extends HKQuantityTypeIdentifier>(identifier: TIdentifier, unit: TUnit, from: string, to: string, limit:
|
|
546
|
-
saveCategorySample: <T extends HKCategoryTypeIdentifier>(identifier: T, value: HKCategoryValueForIdentifier<T>, start: string, end: string, metadata:
|
|
547
|
-
queryStatisticsForQuantity: <TUnit extends HKUnit>(identifier: HKQuantityTypeIdentifier, unit: TUnit, from: string, to: string, options: HKStatisticsOptions[]) => Promise<QueryStatisticsResponseRaw<TUnit>>;
|
|
548
|
-
getPreferredUnits: (identifiers: HKQuantityTypeIdentifier[]) => Promise<TypeToUnitMapping>;
|
|
572
|
+
authorizationStatusFor(type: AuthorizationStatusFor): Promise<boolean>;
|
|
573
|
+
getRequestStatusForAuthorization(write: WritePermissions, read: ReadPermissions): Promise<HKAuthorizationRequestStatus>;
|
|
574
|
+
requestAuthorization(write: WritePermissions, read: ReadPermissions): Promise<boolean>;
|
|
575
|
+
readonly saveQuantitySample: (identifier: HKQuantityTypeIdentifier, unit: HKUnit, value: number, start: string, end: string, metadata: unknown) => Promise<boolean>;
|
|
576
|
+
readonly queryWorkoutSamples: <TEnergy extends HKUnit, TDistance extends HKUnit>(energyUnit: TEnergy, distanceUnit: TDistance, from: string, to: string, limit: number, ascending: boolean) => Promise<readonly HKWorkoutRaw<TEnergy, TDistance>[]>;
|
|
577
|
+
readonly queryCategorySamples: <T extends HKCategoryTypeIdentifier>(identifier: T, from: string, to: string, limit: number, ascending: boolean) => Promise<readonly HKCategorySampleRaw<T>[]>;
|
|
578
|
+
readonly queryQuantitySamples: <TUnit extends HKUnit, TIdentifier extends HKQuantityTypeIdentifier>(identifier: TIdentifier, unit: TUnit, from: string, to: string, limit: number, ascending: boolean) => Promise<readonly HKQuantitySampleRaw<TIdentifier, TUnit>[]>;
|
|
579
|
+
readonly saveCategorySample: <T extends HKCategoryTypeIdentifier>(identifier: T, value: HKCategoryValueForIdentifier<T>, start: string, end: string, metadata: unknown) => Promise<boolean>;
|
|
580
|
+
readonly queryStatisticsForQuantity: <TUnit extends HKUnit>(identifier: HKQuantityTypeIdentifier, unit: TUnit, from: string, to: string, options: readonly HKStatisticsOptions[]) => Promise<QueryStatisticsResponseRaw<TUnit>>;
|
|
581
|
+
readonly getPreferredUnits: (identifiers: readonly HKQuantityTypeIdentifier[]) => Promise<TypeToUnitMapping>;
|
|
582
|
+
readonly getWorkoutRoutes: (workoutUUID: string) => Promise<readonly WorkoutRoute[]>;
|
|
549
583
|
};
|
|
550
584
|
declare const Native: ReactNativeHealthkitTypeNative;
|
|
551
585
|
declare type OnChangeCallback = ({ typeIdentifier, }: {
|
|
552
|
-
typeIdentifier: HKSampleTypeIdentifier;
|
|
586
|
+
readonly typeIdentifier: HKSampleTypeIdentifier;
|
|
553
587
|
}) => void;
|
|
554
588
|
interface HealthkitEventEmitter extends NativeEventEmitter {
|
|
555
|
-
addListener: (eventType: 'onChange', callback: OnChangeCallback) => EmitterSubscription;
|
|
589
|
+
readonly addListener: (eventType: 'onChange', callback: OnChangeCallback) => EmitterSubscription;
|
|
556
590
|
}
|
|
557
591
|
export declare const EventEmitter: HealthkitEventEmitter;
|
|
558
592
|
export default Native;
|
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
import type { HKAuthorizationRequestStatus, HKBiologicalSex, HKBloodType, HKCategorySampleRaw, HKCategoryTypeIdentifier, HKCategoryValueForIdentifier, HKCharacteristicTypeIdentifier, HKCorrelationRaw, HKCorrelationTypeIdentifier, HKFitzpatrickSkinType,
|
|
1
|
+
import type { HKAuthorizationRequestStatus, HKBiologicalSex, HKBloodType, HKCategorySampleRaw, HKCategoryTypeIdentifier, HKCategoryValueForIdentifier, HKCharacteristicTypeIdentifier, HKCorrelationRaw, HKCorrelationTypeIdentifier, HKFitzpatrickSkinType, HKQuantitySampleRaw, HKQuantityTypeIdentifier, HKSampleTypeIdentifier, HKStatisticsOptions, HKUnit, HKUnitSI, HKUnitSIPrefix, HKUpdateFrequency, HKWheelchairUse, HKWorkoutActivityType, HKWorkoutMetadata, HKWorkoutRaw, MetadataMapperForCategoryIdentifier, MetadataMapperForCorrelationIdentifier, MetadataMapperForQuantityIdentifier, QueryStatisticsResponseRaw, WorkoutRoute } from './native-types';
|
|
2
2
|
export interface QueryWorkoutsOptions<TEnergy extends HKUnit, TDistance extends HKUnit> extends GenericQueryOptions {
|
|
3
|
-
energyUnit?: TEnergy;
|
|
4
|
-
distanceUnit?: TDistance;
|
|
3
|
+
readonly energyUnit?: TEnergy;
|
|
4
|
+
readonly distanceUnit?: TDistance;
|
|
5
5
|
}
|
|
6
|
-
export interface HKCategorySample<T extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier> extends Omit<HKCategorySampleRaw<T>, '
|
|
7
|
-
startDate: Date;
|
|
8
|
-
endDate: Date;
|
|
6
|
+
export interface HKCategorySample<T extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier> extends Omit<HKCategorySampleRaw<T>, 'endDate' | 'startDate'> {
|
|
7
|
+
readonly startDate: Date;
|
|
8
|
+
readonly endDate: Date;
|
|
9
9
|
}
|
|
10
10
|
export declare type GenericQueryOptions = {
|
|
11
|
-
from?: Date;
|
|
12
|
-
to?: Date;
|
|
13
|
-
limit?:
|
|
14
|
-
ascending?: boolean;
|
|
11
|
+
readonly from?: Date;
|
|
12
|
+
readonly to?: Date;
|
|
13
|
+
readonly limit?: number;
|
|
14
|
+
readonly ascending?: boolean;
|
|
15
15
|
};
|
|
16
|
-
export interface HKWorkout<TEnergy extends HKUnit = HKUnit, TDistance extends HKUnit = HKUnit> extends Omit<HKWorkoutRaw<TEnergy, TDistance>, '
|
|
17
|
-
startDate: Date;
|
|
18
|
-
endDate: Date;
|
|
16
|
+
export interface HKWorkout<TEnergy extends HKUnit = HKUnit, TDistance extends HKUnit = HKUnit> extends Omit<HKWorkoutRaw<TEnergy, TDistance>, 'endDate' | 'startDate'> {
|
|
17
|
+
readonly startDate: Date;
|
|
18
|
+
readonly endDate: Date;
|
|
19
19
|
}
|
|
20
|
-
export interface HKQuantitySample<TIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier, TUnit extends HKUnit = HKUnit> extends Omit<HKQuantitySampleRaw<TIdentifier, TUnit>, '
|
|
21
|
-
startDate: Date;
|
|
22
|
-
endDate: Date;
|
|
20
|
+
export interface HKQuantitySample<TIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier, TUnit extends HKUnit = HKUnit> extends Omit<HKQuantitySampleRaw<TIdentifier, TUnit>, 'endDate' | 'startDate'> {
|
|
21
|
+
readonly startDate: Date;
|
|
22
|
+
readonly endDate: Date;
|
|
23
23
|
}
|
|
24
24
|
export interface QueryStatisticsResponse<T extends HKUnit = HKUnit> extends Omit<QueryStatisticsResponseRaw<T>, 'mostRecentQuantityDateInterval'> {
|
|
25
|
-
mostRecentQuantityDateInterval?: {
|
|
26
|
-
from: Date;
|
|
27
|
-
to: Date;
|
|
25
|
+
readonly mostRecentQuantityDateInterval?: {
|
|
26
|
+
readonly from: Date;
|
|
27
|
+
readonly to: Date;
|
|
28
28
|
};
|
|
29
29
|
}
|
|
30
30
|
declare type UnsubscribeFunction = () => Promise<boolean>;
|
|
@@ -34,25 +34,25 @@ export declare type GetDateOfBirthFn = () => Promise<Date>;
|
|
|
34
34
|
export declare type GetBiologicalSexFn = () => Promise<HKBiologicalSex>;
|
|
35
35
|
export declare type GetWheelchairUseFn = () => Promise<HKWheelchairUse>;
|
|
36
36
|
export declare type GetFitzpatrickSkinTypeFn = () => Promise<HKFitzpatrickSkinType>;
|
|
37
|
-
export declare type QueryStatisticsForQuantityFn = <TUnit extends HKUnit>(identifier: HKQuantityTypeIdentifier, options: HKStatisticsOptions[], from: Date, to?: Date, unit?: TUnit) => Promise<QueryStatisticsResponse<TUnit>>;
|
|
38
|
-
export declare type QueryWorkoutsFn = <TEnergy extends HKUnit, TDistance extends HKUnit>(options: QueryWorkoutsOptions<TEnergy, TDistance>) => Promise<HKWorkout<TEnergy, TDistance>[]>;
|
|
39
|
-
export declare type AuthorizationStatusForFn = (type:
|
|
40
|
-
export declare type QueryCategorySamplesFn = <T extends HKCategoryTypeIdentifier>(identifier: T, options: GenericQueryOptions) => Promise<HKCategorySample<T>[]>;
|
|
41
|
-
export declare type GetRequestStatusForAuthorizationFn = (read: (HKCharacteristicTypeIdentifier | HKSampleTypeIdentifier)[], write?: HKSampleTypeIdentifier[]) => Promise<HKAuthorizationRequestStatus>;
|
|
42
|
-
export declare type RequestAuthorizationFn = (read: (HKCharacteristicTypeIdentifier | HKSampleTypeIdentifier)[], write?: HKSampleTypeIdentifier[]) => Promise<boolean>;
|
|
37
|
+
export declare type QueryStatisticsForQuantityFn = <TUnit extends HKUnit>(identifier: HKQuantityTypeIdentifier, options: readonly HKStatisticsOptions[], from: Date, to?: Date, unit?: TUnit) => Promise<QueryStatisticsResponse<TUnit>>;
|
|
38
|
+
export declare type QueryWorkoutsFn = <TEnergy extends HKUnit, TDistance extends HKUnit>(options: QueryWorkoutsOptions<TEnergy, TDistance>) => Promise<readonly HKWorkout<TEnergy, TDistance>[]>;
|
|
39
|
+
export declare type AuthorizationStatusForFn = (type: HKCharacteristicTypeIdentifier | HKSampleTypeIdentifier) => Promise<boolean>;
|
|
40
|
+
export declare type QueryCategorySamplesFn = <T extends HKCategoryTypeIdentifier>(identifier: T, options: GenericQueryOptions) => Promise<readonly HKCategorySample<T>[]>;
|
|
41
|
+
export declare type GetRequestStatusForAuthorizationFn = (read: readonly (HKCharacteristicTypeIdentifier | HKSampleTypeIdentifier)[], write?: readonly HKSampleTypeIdentifier[]) => Promise<HKAuthorizationRequestStatus>;
|
|
42
|
+
export declare type RequestAuthorizationFn = (read: readonly (HKCharacteristicTypeIdentifier | HKSampleTypeIdentifier)[], write?: readonly HKSampleTypeIdentifier[]) => Promise<boolean>;
|
|
43
43
|
export declare type SaveQuantitySampleFn = <TUnit extends HKQuantityTypeIdentifier>(identifier: TUnit, unit: HKUnit, value: number, options?: {
|
|
44
|
-
start?: Date;
|
|
45
|
-
end?: Date;
|
|
46
|
-
metadata?: MetadataMapperForQuantityIdentifier<TUnit>;
|
|
44
|
+
readonly start?: Date;
|
|
45
|
+
readonly end?: Date;
|
|
46
|
+
readonly metadata?: MetadataMapperForQuantityIdentifier<TUnit>;
|
|
47
47
|
}) => Promise<boolean>;
|
|
48
48
|
export declare type QueryQuantitySamplesFn = <TIdentifier extends HKQuantityTypeIdentifier, TUnit extends HKUnit = HKUnit>(identifier: TIdentifier, options: GenericQueryOptions & {
|
|
49
|
-
unit?: TUnit;
|
|
50
|
-
}) => Promise<HKQuantitySample<TIdentifier, TUnit>[]>;
|
|
49
|
+
readonly unit?: TUnit;
|
|
50
|
+
}) => Promise<readonly HKQuantitySample<TIdentifier, TUnit>[]>;
|
|
51
51
|
export declare type SubscribeToChangesFn = (identifier: HKSampleTypeIdentifier, callback: () => void) => Promise<UnsubscribeFunction>;
|
|
52
52
|
export declare type SaveCategorySampleFn = <T extends HKCategoryTypeIdentifier>(identifier: T, value: HKCategoryValueForIdentifier<T>, options?: {
|
|
53
|
-
start?: Date;
|
|
54
|
-
end?: Date;
|
|
55
|
-
metadata?: MetadataMapperForCategoryIdentifier<T>;
|
|
53
|
+
readonly start?: Date;
|
|
54
|
+
readonly end?: Date;
|
|
55
|
+
readonly metadata?: MetadataMapperForCategoryIdentifier<T>;
|
|
56
56
|
}) => Promise<boolean>;
|
|
57
57
|
export declare type GetMostRecentCategorySampleFn = <T extends HKCategoryTypeIdentifier>(identifier: T) => Promise<HKCategorySample<T> | null>;
|
|
58
58
|
export declare type MostRecentCategorySampleHook = <T extends HKCategoryTypeIdentifier>(identifier: T) => HKCategorySample<T> | null;
|
|
@@ -61,56 +61,58 @@ export declare type GetMostRecentQuantitySampleFn = <TIdentifier extends HKQuant
|
|
|
61
61
|
export declare type MostRecentQuantitySampleHook = <TIdentifier extends HKQuantityTypeIdentifier, TUnit extends HKUnit>(identifier: TIdentifier, unit?: TUnit) => HKQuantitySample<TIdentifier, TUnit> | null;
|
|
62
62
|
export declare type GetMostRecentWorkoutFn = <TEnergy extends HKUnit, TDistance extends HKUnit>(options?: Pick<QueryWorkoutsOptions<TEnergy, TDistance>, 'distanceUnit' | 'energyUnit'>) => Promise<HKWorkout<TEnergy, TDistance> | null>;
|
|
63
63
|
export declare type MostRecentWorkoutHook = <TEnergy extends HKUnit, TDistance extends HKUnit>(options?: Pick<QueryWorkoutsOptions<TEnergy, TDistance>, 'distanceUnit' | 'energyUnit'>) => HKWorkout<TEnergy, TDistance> | null;
|
|
64
|
-
export declare type GetPreferredUnitsFn = (identifiers: HKQuantityTypeIdentifier[]) => Promise<HKUnit[]>;
|
|
64
|
+
export declare type GetPreferredUnitsFn = (identifiers: readonly HKQuantityTypeIdentifier[]) => Promise<readonly HKUnit[]>;
|
|
65
65
|
export declare type GetPreferredUnitFn = (identifier: HKQuantityTypeIdentifier) => Promise<HKUnit>;
|
|
66
|
-
export declare type SaveCorrelationSampleFn = <TIdentifier extends HKCorrelationTypeIdentifier>(typeIdentifier: TIdentifier, samples: (Omit<HKCategorySample, '
|
|
67
|
-
start?: Date;
|
|
68
|
-
end?: Date;
|
|
69
|
-
metadata?: MetadataMapperForCorrelationIdentifier<TIdentifier>;
|
|
66
|
+
export declare type SaveCorrelationSampleFn = <TIdentifier extends HKCorrelationTypeIdentifier>(typeIdentifier: TIdentifier, samples: readonly (Omit<HKCategorySample, 'device' | 'endDate' | 'startDate' | 'uuid'> | Omit<HKQuantitySample, 'device' | 'endDate' | 'startDate' | 'uuid'>)[], options?: {
|
|
67
|
+
readonly start?: Date;
|
|
68
|
+
readonly end?: Date;
|
|
69
|
+
readonly metadata?: MetadataMapperForCorrelationIdentifier<TIdentifier>;
|
|
70
70
|
}) => Promise<boolean>;
|
|
71
|
-
export declare type SaveWorkoutSampleFn = (typeIdentifier: HKWorkoutActivityType, quantities: Omit<HKQuantitySample, '
|
|
72
|
-
end?: Date;
|
|
73
|
-
metadata?: HKWorkoutMetadata;
|
|
71
|
+
export declare type SaveWorkoutSampleFn = (typeIdentifier: HKWorkoutActivityType, quantities: readonly Omit<HKQuantitySample, 'device' | 'endDate' | 'startDate' | 'uuid'>[], start: Date, options?: {
|
|
72
|
+
readonly end?: Date;
|
|
73
|
+
readonly metadata?: HKWorkoutMetadata;
|
|
74
74
|
}) => Promise<boolean>;
|
|
75
|
-
export interface HKCorrelation<TIdentifier extends HKCorrelationTypeIdentifier> extends Omit<HKCorrelationRaw<TIdentifier>, '
|
|
76
|
-
objects: (
|
|
77
|
-
startDate: Date;
|
|
78
|
-
endDate: Date;
|
|
75
|
+
export interface HKCorrelation<TIdentifier extends HKCorrelationTypeIdentifier> extends Omit<HKCorrelationRaw<TIdentifier>, 'endDate' | 'objects' | 'startDate'> {
|
|
76
|
+
readonly objects: readonly (HKCategorySample | HKQuantitySample)[];
|
|
77
|
+
readonly startDate: Date;
|
|
78
|
+
readonly endDate: Date;
|
|
79
79
|
}
|
|
80
|
-
export declare type QueryCorrelationSamplesFn = <TIdentifier extends HKCorrelationTypeIdentifier>(typeIdentifier: TIdentifier, options: Omit<GenericQueryOptions, '
|
|
80
|
+
export declare type QueryCorrelationSamplesFn = <TIdentifier extends HKCorrelationTypeIdentifier>(typeIdentifier: TIdentifier, options: Omit<GenericQueryOptions, 'ascending' | 'limit'>) => Promise<readonly HKCorrelation<TIdentifier>[]>;
|
|
81
81
|
export declare type SubscribeToChangesHook = <TIdentifier extends HKSampleTypeIdentifier>(identifier: TIdentifier, onChange: () => void, runInitialUpdate?: boolean) => void;
|
|
82
|
+
export declare type GetWorkoutRoutesFn = (workoutUUID: string) => Promise<readonly WorkoutRoute[]>;
|
|
82
83
|
export declare type ReactNativeHealthkit = {
|
|
83
|
-
authorizationStatusFor: AuthorizationStatusForFn;
|
|
84
|
-
getBiologicalSex: GetBiologicalSexFn;
|
|
85
|
-
getBloodType: GetBloodTypeFn;
|
|
86
|
-
getDateOfBirth: GetDateOfBirthFn;
|
|
87
|
-
getFitzpatrickSkinType: GetFitzpatrickSkinTypeFn;
|
|
88
|
-
getMostRecentQuantitySample: GetMostRecentQuantitySampleFn;
|
|
89
|
-
getMostRecentCategorySample: GetMostRecentCategorySampleFn;
|
|
90
|
-
getMostRecentWorkout: GetMostRecentWorkoutFn;
|
|
91
|
-
getPreferredUnit: GetPreferredUnitFn;
|
|
92
|
-
getPreferredUnits: GetPreferredUnitsFn;
|
|
93
|
-
getRequestStatusForAuthorization: GetRequestStatusForAuthorizationFn;
|
|
94
|
-
getWheelchairUse: GetWheelchairUseFn;
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
84
|
+
readonly authorizationStatusFor: AuthorizationStatusForFn;
|
|
85
|
+
readonly getBiologicalSex: GetBiologicalSexFn;
|
|
86
|
+
readonly getBloodType: GetBloodTypeFn;
|
|
87
|
+
readonly getDateOfBirth: GetDateOfBirthFn;
|
|
88
|
+
readonly getFitzpatrickSkinType: GetFitzpatrickSkinTypeFn;
|
|
89
|
+
readonly getMostRecentQuantitySample: GetMostRecentQuantitySampleFn;
|
|
90
|
+
readonly getMostRecentCategorySample: GetMostRecentCategorySampleFn;
|
|
91
|
+
readonly getMostRecentWorkout: GetMostRecentWorkoutFn;
|
|
92
|
+
readonly getPreferredUnit: GetPreferredUnitFn;
|
|
93
|
+
readonly getPreferredUnits: GetPreferredUnitsFn;
|
|
94
|
+
readonly getRequestStatusForAuthorization: GetRequestStatusForAuthorizationFn;
|
|
95
|
+
readonly getWheelchairUse: GetWheelchairUseFn;
|
|
96
|
+
readonly getWorkoutRoutes: GetWorkoutRoutesFn;
|
|
97
|
+
readonly buildUnitWithPrefix: (prefix: HKUnitSIPrefix, unit: HKUnitSI) => HKUnit;
|
|
98
|
+
readonly isHealthDataAvailable: IsHealthDataAvailableFn;
|
|
99
|
+
readonly queryCategorySamples: QueryCategorySamplesFn;
|
|
100
|
+
readonly queryQuantitySamples: QueryQuantitySamplesFn;
|
|
101
|
+
readonly queryStatisticsForQuantity: QueryStatisticsForQuantityFn;
|
|
102
|
+
readonly queryWorkouts: QueryWorkoutsFn;
|
|
103
|
+
readonly queryCorrelationSamples: QueryCorrelationSamplesFn;
|
|
104
|
+
readonly requestAuthorization: RequestAuthorizationFn;
|
|
105
|
+
readonly saveCategorySample: SaveCategorySampleFn;
|
|
106
|
+
readonly saveQuantitySample: SaveQuantitySampleFn;
|
|
107
|
+
readonly saveCorrelationSample: SaveCorrelationSampleFn;
|
|
108
|
+
readonly saveWorkoutSample: SaveWorkoutSampleFn;
|
|
109
|
+
readonly enableBackgroundDelivery: (typeIdentifier: HKSampleTypeIdentifier, updateFrequency: HKUpdateFrequency) => Promise<boolean>;
|
|
110
|
+
readonly disableBackgroundDelivery: (typeIdentifier: HKSampleTypeIdentifier) => Promise<boolean>;
|
|
111
|
+
readonly disableAllBackgroundDelivery: () => Promise<boolean>;
|
|
112
|
+
readonly subscribeToChanges: SubscribeToChangesFn;
|
|
113
|
+
readonly useMostRecentWorkout: MostRecentWorkoutHook;
|
|
114
|
+
readonly useMostRecentCategorySample: MostRecentCategorySampleHook;
|
|
115
|
+
readonly useMostRecentQuantitySample: MostRecentQuantitySampleHook;
|
|
116
|
+
readonly useSubscribeToChanges: SubscribeToChangesHook;
|
|
115
117
|
};
|
|
116
118
|
export {};
|