@kingstinct/react-native-healthkit 14.1.0 → 15.1.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.
Files changed (71) hide show
  1. package/README.md +32 -2
  2. package/app.plugin.js +49 -94
  3. package/app.plugin.ts +6 -56
  4. package/ios/BackgroundDeliveryManager.swift +13 -6
  5. package/ios/BackgroundLaunchHook.mm +41 -0
  6. package/ios/Constants.swift +24 -0
  7. package/ios/CoreModule.swift +5 -1
  8. package/ios/Helpers.swift +29 -1
  9. package/ios/MemoryEstimation.swift +83 -0
  10. package/ios/QuantityTypeModule.swift +34 -26
  11. package/ios/Serializers.swift +18 -3
  12. package/ios/SourceProxy.swift +14 -5
  13. package/ios/WorkoutProxy.swift +28 -11
  14. package/lib/commonjs/generated/healthkit.generated.js +13 -3
  15. package/lib/commonjs/healthkit.ios.js +3 -1
  16. package/lib/commonjs/healthkit.js +4 -2
  17. package/lib/module/generated/healthkit.generated.js +12 -2
  18. package/lib/module/healthkit.ios.js +2 -0
  19. package/lib/module/healthkit.js +2 -0
  20. package/lib/typescript/generated/healthkit.generated.d.ts +17 -7
  21. package/lib/typescript/healthkit.d.ts +1 -0
  22. package/lib/typescript/healthkit.ios.d.ts +2 -0
  23. package/lib/typescript/specs/CoreModule.nitro.d.ts +6 -4
  24. package/lib/typescript/specs/SourceProxy.nitro.d.ts +1 -2
  25. package/lib/typescript/types/QuantityType.d.ts +3 -3
  26. package/lib/typescript/types/Source.d.ts +2 -2
  27. package/lib/typescript/types/Units.d.ts +1 -1
  28. package/nitrogen/generated/ios/ReactNativeHealthkit-Swift-Cxx-Bridge.cpp +16 -16
  29. package/nitrogen/generated/ios/ReactNativeHealthkit-Swift-Cxx-Bridge.hpp +23 -12
  30. package/nitrogen/generated/ios/c++/HybridCategoryTypeModuleSpecSwift.hpp +7 -4
  31. package/nitrogen/generated/ios/c++/HybridCorrelationTypeModuleSpecSwift.hpp +7 -4
  32. package/nitrogen/generated/ios/c++/HybridElectrocardiogramModuleSpecSwift.hpp +7 -4
  33. package/nitrogen/generated/ios/c++/HybridHeartbeatSeriesModuleSpecSwift.hpp +7 -4
  34. package/nitrogen/generated/ios/c++/HybridMedicationModuleSpecSwift.hpp +7 -4
  35. package/nitrogen/generated/ios/c++/HybridQuantityTypeModuleSpecSwift.hpp +7 -4
  36. package/nitrogen/generated/ios/c++/HybridStateOfMindModuleSpecSwift.hpp +7 -4
  37. package/nitrogen/generated/ios/c++/HybridWorkoutProxySpecSwift.hpp +3 -4
  38. package/nitrogen/generated/ios/c++/HybridWorkoutsModuleSpecSwift.hpp +6 -3
  39. package/nitrogen/generated/ios/swift/CategoryTypeIdentifier.swift +8 -0
  40. package/nitrogen/generated/ios/swift/CategoryTypeIdentifierWriteable.swift +8 -0
  41. package/nitrogen/generated/ios/swift/ObjectTypeIdentifier.swift +8 -4
  42. package/nitrogen/generated/ios/swift/QuantityTypeIdentifier.swift +0 -4
  43. package/nitrogen/generated/ios/swift/QuantityTypeIdentifierWriteable.swift +0 -4
  44. package/nitrogen/generated/ios/swift/QueryStatisticsResponse.swift +6 -13
  45. package/nitrogen/generated/ios/swift/QueryStatisticsResponseFromSingleSource.swift +4 -11
  46. package/nitrogen/generated/ios/swift/SampleTypeIdentifier.swift +8 -4
  47. package/nitrogen/generated/ios/swift/SampleTypeIdentifierWriteable.swift +8 -4
  48. package/nitrogen/generated/ios/swift/SourceRevision.swift +4 -11
  49. package/nitrogen/generated/ios/swift/WorkoutActivityType.swift +8 -0
  50. package/nitrogen/generated/shared/c++/CategoryTypeIdentifier.hpp +67 -59
  51. package/nitrogen/generated/shared/c++/CategoryTypeIdentifierWriteable.hpp +67 -59
  52. package/nitrogen/generated/shared/c++/ObjectTypeIdentifier.hpp +202 -198
  53. package/nitrogen/generated/shared/c++/QuantityTypeIdentifier.hpp +107 -111
  54. package/nitrogen/generated/shared/c++/QuantityTypeIdentifierWriteable.hpp +107 -111
  55. package/nitrogen/generated/shared/c++/QueryStatisticsResponse.hpp +8 -9
  56. package/nitrogen/generated/shared/c++/QueryStatisticsResponseFromSingleSource.hpp +8 -9
  57. package/nitrogen/generated/shared/c++/SampleTypeIdentifier.hpp +195 -191
  58. package/nitrogen/generated/shared/c++/SampleTypeIdentifierWriteable.hpp +189 -185
  59. package/nitrogen/generated/shared/c++/SourceRevision.hpp +8 -9
  60. package/nitrogen/generated/shared/c++/WorkoutActivityType.hpp +4 -0
  61. package/package.json +5 -3
  62. package/src/generated/healthkit-schema.json +45 -8
  63. package/src/generated/healthkit.generated.ts +18 -6
  64. package/src/healthkit.ios.ts +3 -0
  65. package/src/healthkit.ts +5 -0
  66. package/src/specs/CoreModule.nitro.ts +6 -4
  67. package/src/specs/SourceProxy.nitro.ts +1 -1
  68. package/src/type-tests/generated-typing.ts +30 -8
  69. package/src/types/QuantityType.ts +3 -3
  70. package/src/types/Source.ts +2 -2
  71. package/src/types/Units.ts +1 -1
@@ -62,7 +62,9 @@ func serializeDeletedSample(sample: HKDeletedObject) -> DeletedSample {
62
62
 
63
63
  func serializeCategorySample(sample: HKCategorySample) -> CategorySample {
64
64
  return CategorySample(
65
- categoryType: CategoryTypeIdentifier(fromString: sample.categoryType.identifier)!,
65
+ categoryType: CategoryTypeIdentifier(
66
+ fromString: categoryTypeIdentifierName(
67
+ fromHealthKitIdentifier: sample.categoryType.identifier))!,
66
68
  value: Double(sample.value),
67
69
  sampleType: serializeSampleType(sample.sampleType),
68
70
  startDate: sample.startDate,
@@ -75,12 +77,23 @@ func serializeCategorySample(sample: HKCategorySample) -> CategorySample {
75
77
  )
76
78
  }
77
79
 
80
+ /// Wraps an `HKSource` in a proxy HybridObject. Only use this where the
81
+ /// caller explicitly asks for a source handle (`querySources`,
82
+ /// `currentAppSource`); everything embedded in serialized values should use
83
+ /// `serializeSourceStruct` so that no per-sample native object is allocated.
78
84
  func serializeSource(_ source: HKSource) -> SourceProxy {
79
85
  return SourceProxy(
80
86
  source: source
81
87
  )
82
88
  }
83
89
 
90
+ func serializeSourceStruct(_ source: HKSource) -> Source {
91
+ return Source(
92
+ name: source.name,
93
+ bundleIdentifier: source.bundleIdentifier
94
+ )
95
+ }
96
+
84
97
  func serializeUnknownQuantityTyped(quantity: HKQuantity?) -> Quantity? {
85
98
  guard let quantity = quantity else {
86
99
  return nil
@@ -290,7 +303,7 @@ func serializeOperatingSystemVersion(_ version: OperatingSystemVersion) -> Strin
290
303
 
291
304
  func serializeSourceRevision(_ hkSourceRevision: HKSourceRevision) -> SourceRevision {
292
305
  return SourceRevision(
293
- source: serializeSource(hkSourceRevision.source),
306
+ source: serializeSourceStruct(hkSourceRevision.source),
294
307
  version: hkSourceRevision.version,
295
308
  operatingSystemVersion: serializeOperatingSystemVersion(
296
309
  hkSourceRevision.operatingSystemVersion),
@@ -300,7 +313,9 @@ func serializeSourceRevision(_ hkSourceRevision: HKSourceRevision) -> SourceRevi
300
313
 
301
314
  func serializeSampleType(_ sampleType: HKSampleType) -> SampleType {
302
315
  return SampleType(
303
- identifier: sampleType.identifier,
316
+ identifier: sampleType is HKCategoryType
317
+ ? categoryTypeIdentifierName(fromHealthKitIdentifier: sampleType.identifier)
318
+ : sampleType.identifier,
304
319
  allowsRecalibrationForEstimates: sampleType.allowsRecalibrationForEstimates,
305
320
  isMinimumDurationRestricted: sampleType.isMinimumDurationRestricted,
306
321
  isMaximumDurationRestricted: sampleType.isMaximumDurationRestricted
@@ -14,11 +14,7 @@ class SourceProxy: HybridSourceProxySpec {
14
14
  warnWithPrefix("SourceProxy does not support toJSON with key: \(key!)")
15
15
  }
16
16
 
17
- return Source(
18
- name: self.name,
19
- bundleIdentifier: self.bundleIdentifier
20
- )
21
-
17
+ return serializeSourceStruct(source)
22
18
  }
23
19
 
24
20
  let source: HKSource
@@ -31,5 +27,18 @@ class SourceProxy: HybridSourceProxySpec {
31
27
  self.source = source
32
28
  self.name = source.name
33
29
  self.bundleIdentifier = source.bundleIdentifier
30
+ // HKSource object with its own name and bundle identifier strings, plus
31
+ // the Swift copies of those strings. Computed once; Nitro reads it on
32
+ // every conversion to JS.
33
+ self.memorySize =
34
+ 128
35
+ + 2 * estimateStringMemorySize(source.name)
36
+ + 2 * estimateStringMemorySize(source.bundleIdentifier)
37
+ + nitroHybridObjectOverheadBytes
34
38
  }
39
+
40
+ /// Estimated heap footprint of the wrapped `HKSource`, reported to Nitro so
41
+ /// the JS garbage collector accounts for the native memory held by each
42
+ /// proxy. Nitro adds the Swift instance's own size on top.
43
+ let memorySize: Int
35
44
  }
@@ -49,38 +49,43 @@ func getWorkoutRoutesInternal(
49
49
 
50
50
  func getRouteLocations(
51
51
  route: HKWorkoutRoute
52
- ) async -> [CLLocation] {
53
- let locations = try! await withCheckedThrowingContinuation {
52
+ ) async throws -> [CLLocation] {
53
+ return try await withCheckedThrowingContinuation {
54
54
  (continuation: CheckedContinuation<[CLLocation], Error>) in
55
55
  var allLocations: [CLLocation] = []
56
+ // HealthKit streams locations in batches through the same handler; make
57
+ // sure the continuation is resumed exactly once whatever the sequence.
58
+ var hasFinished = false
59
+ let finish = { (result: Result<[CLLocation], Error>) in
60
+ guard !hasFinished else {
61
+ return
62
+ }
63
+ hasFinished = true
64
+ continuation.resume(with: result)
65
+ }
56
66
 
57
67
  let query = HKWorkoutRouteQuery(route: route) {
58
68
  (_, locationsOrNil, done, errorOrNil) in
59
69
 
60
70
  DispatchQueue.main.async {
61
71
  if let error = errorOrNil {
62
- continuation.resume(throwing: error)
63
- return
72
+ return finish(.failure(error))
64
73
  }
65
74
 
66
75
  guard let currentLocationBatch = locationsOrNil else {
67
- return continuation.resume(
68
- throwing: runtimeErrorWithPrefix("Unexpected empty response")
69
- )
76
+ return finish(.failure(runtimeErrorWithPrefix("Unexpected empty response")))
70
77
  }
71
78
 
72
79
  allLocations.append(contentsOf: currentLocationBatch)
73
80
 
74
81
  if done {
75
- continuation.resume(returning: allLocations)
82
+ finish(.success(allLocations))
76
83
  }
77
84
  }
78
85
  }
79
86
 
80
87
  store.execute(query)
81
88
  }
82
-
83
- return locations
84
89
  }
85
90
 
86
91
  func serializeLocation(location: CLLocation, previousLocation: CLLocation?)
@@ -122,7 +127,7 @@ func getSerializedWorkoutLocations(
122
127
  route.metadata
123
128
  )
124
129
 
125
- let routeCLLocations = await getRouteLocations(
130
+ let routeCLLocations = try await getRouteLocations(
126
131
  route: route
127
132
  )
128
133
 
@@ -397,8 +402,20 @@ class WorkoutProxy: HybridWorkoutProxySpec {
397
402
 
398
403
  init(workout: HKWorkout) {
399
404
  self.workout = workout
405
+ // Computed here rather than lazily: proxies are created inside
406
+ // `Promise.async` on a background executor, while Nitro reads `memorySize`
407
+ // on the JS thread every time the proxy is converted to a JS object.
408
+ self.memorySize = estimateWorkoutMemorySize(workout) + nitroHybridObjectOverheadBytes
400
409
  }
401
410
 
411
+ /// Estimated heap footprint of the wrapped `HKWorkout` graph (events,
412
+ /// activities, statistics, metadata), reported to Nitro so the JS garbage
413
+ /// collector sees the native memory kept alive by each proxy. Nitro adds
414
+ /// the Swift instance's own size on top. Rough by design: the goal is the
415
+ /// right order of magnitude per workout, so hundreds of proxies from a query
416
+ /// do not look like hundreds of empty objects.
417
+ let memorySize: Int
418
+
402
419
  func getWorkoutPlan() throws -> Promise<WorkoutPlan?> {
403
420
  return Promise.async {
404
421
  if #available(iOS 17.0.0, *) {
@@ -4,7 +4,7 @@
4
4
  * Source: scripts/generate-healthkit.ts
5
5
  */
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
- exports.WorkoutSwimmingLocationType = exports.WorkoutEventType = exports.WorkoutActivityType = exports.WeatherCondition = exports.WaterSalinity = exports.VO2MaxTestType = exports.UserMotionContext = exports.SwimmingStrokeStyle = exports.PhysicalEffortEstimationType = exports.InsulinDeliveryReason = exports.HeartRateSensorLocation = exports.HeartRateRecoveryTestType = exports.HeartRateMotionContext = exports.DevicePlacementSide = exports.CyclingFunctionalThresholdPowerTestType = exports.CategoryValueVaginalBleeding = exports.CategoryValueSleepAnalysis = exports.CategoryValueSeverity = exports.CategoryValueProgesteroneTestResult = exports.CategoryValuePresence = exports.CategoryValuePregnancyTestResult = exports.CategoryValueOvulationTestResult = exports.CategoryValueMenstrualFlow = exports.CategoryValueLowCardioFitnessEvent = exports.CategoryValueHeadphoneAudioExposureEvent = exports.CategoryValueEnvironmentalAudioExposureEvent = exports.CategoryValueContraceptive = exports.CategoryValueCervicalMucusQuality = exports.CategoryValueAudioExposureEvent = exports.CategoryValueAppleWalkingSteadinessEvent = exports.CategoryValueAppleStandHour = exports.CategoryValueAppetiteChanges = exports.CategoryValue = exports.BodyTemperatureSensorLocation = exports.BloodGlucoseMealTime = exports.AppleECGAlgorithmVersion = exports.CATEGORY_IDENTIFIER_VALUE_ENUMS = exports.QUANTITY_IDENTIFIER_CANONICAL_UNITS = exports.CATEGORY_IDENTIFIER_IOS_AVAILABILITY = exports.QUANTITY_IDENTIFIER_IOS_AVAILABILITY = void 0;
7
+ exports.WorkoutSwimmingLocationType = exports.WorkoutEventType = exports.WorkoutActivityType = exports.WeatherCondition = exports.WaterSalinity = exports.VO2MaxTestType = exports.UserMotionContext = exports.SwimmingStrokeStyle = exports.PhysicalEffortEstimationType = exports.InsulinDeliveryReason = exports.HeartRateSensorLocation = exports.HeartRateRecoveryTestType = exports.HeartRateMotionContext = exports.DevicePlacementSide = exports.CyclingFunctionalThresholdPowerTestType = exports.CategoryValueVaginalBleeding = exports.CategoryValueSleepAnalysis = exports.CategoryValueSeverity = exports.CategoryValueProgesteroneTestResult = exports.CategoryValuePresence = exports.CategoryValuePregnancyTestResult = exports.CategoryValueOvulationTestResult = exports.CategoryValueMenstrualFlow = exports.CategoryValueMenopausalState = exports.CategoryValueLowCardioFitnessEvent = exports.CategoryValueHeadphoneAudioExposureEvent = exports.CategoryValueEnvironmentalAudioExposureEvent = exports.CategoryValueContraceptive = exports.CategoryValueCervicalMucusQuality = exports.CategoryValueAudioExposureEvent = exports.CategoryValueAppleWalkingSteadinessEvent = exports.CategoryValueAppleStandHour = exports.CategoryValueAppetiteChanges = exports.CategoryValue = exports.BodyTemperatureSensorLocation = exports.BloodGlucoseMealTime = exports.AppleECGAlgorithmVersion = exports.CATEGORY_IDENTIFIER_VALUE_ENUMS = exports.QUANTITY_IDENTIFIER_CANONICAL_UNITS = exports.CATEGORY_IDENTIFIER_IOS_AVAILABILITY = exports.QUANTITY_IDENTIFIER_IOS_AVAILABILITY = void 0;
8
8
  exports.QUANTITY_IDENTIFIER_IOS_AVAILABILITY = {
9
9
  HKQuantityTypeIdentifierActiveEnergyBurned: '8.0',
10
10
  HKQuantityTypeIdentifierAppleExerciseTime: '9.3',
@@ -18,7 +18,6 @@ exports.QUANTITY_IDENTIFIER_IOS_AVAILABILITY = {
18
18
  HKQuantityTypeIdentifierBasalEnergyBurned: '8.0',
19
19
  HKQuantityTypeIdentifierBloodAlcoholContent: '8.0',
20
20
  HKQuantityTypeIdentifierBloodGlucose: '8.0',
21
- HKQuantityTypeIdentifierBloodKetones: '8.0',
22
21
  HKQuantityTypeIdentifierBloodPressureDiastolic: '8.0',
23
22
  HKQuantityTypeIdentifierBloodPressureSystolic: '8.0',
24
23
  HKQuantityTypeIdentifierBodyFatPercentage: '8.0',
@@ -136,6 +135,7 @@ exports.CATEGORY_IDENTIFIER_IOS_AVAILABILITY = {
136
135
  HKCategoryTypeIdentifierAppleWalkingSteadinessEvent: '15.0',
137
136
  HKCategoryTypeIdentifierAudioExposureEvent: '13.0',
138
137
  HKCategoryTypeIdentifierBladderIncontinence: '14.0',
138
+ HKCategoryTypeIdentifierBleedingAfterMenopause: '27.0',
139
139
  HKCategoryTypeIdentifierBleedingAfterPregnancy: '18.0',
140
140
  HKCategoryTypeIdentifierBleedingDuringPregnancy: '18.0',
141
141
  HKCategoryTypeIdentifierBloating: '13.6',
@@ -173,6 +173,7 @@ exports.CATEGORY_IDENTIFIER_IOS_AVAILABILITY = {
173
173
  HKCategoryTypeIdentifierLowerBackPain: '13.6',
174
174
  HKCategoryTypeIdentifierLowHeartRateEvent: '12.2',
175
175
  HKCategoryTypeIdentifierMemoryLapse: '14.0',
176
+ HKCategoryTypeIdentifierMenopausalState: '27.0',
176
177
  HKCategoryTypeIdentifierMenstrualFlow: '9.0',
177
178
  HKCategoryTypeIdentifierMindfulSession: '10.0',
178
179
  HKCategoryTypeIdentifierMoodChanges: '13.6',
@@ -213,7 +214,6 @@ exports.QUANTITY_IDENTIFIER_CANONICAL_UNITS = {
213
214
  HKQuantityTypeIdentifierBasalEnergyBurned: 'kcal',
214
215
  HKQuantityTypeIdentifierBloodAlcoholContent: '%',
215
216
  HKQuantityTypeIdentifierBloodGlucose: 'mg/dL',
216
- HKQuantityTypeIdentifierBloodKetones: 'mmol/L',
217
217
  HKQuantityTypeIdentifierBloodPressureDiastolic: 'mmHg',
218
218
  HKQuantityTypeIdentifierBloodPressureSystolic: 'mmHg',
219
219
  HKQuantityTypeIdentifierBodyFatPercentage: '%',
@@ -331,6 +331,7 @@ exports.CATEGORY_IDENTIFIER_VALUE_ENUMS = {
331
331
  HKCategoryTypeIdentifierAppleWalkingSteadinessEvent: 'CategoryValueAppleWalkingSteadinessEvent',
332
332
  HKCategoryTypeIdentifierAudioExposureEvent: null,
333
333
  HKCategoryTypeIdentifierBladderIncontinence: 'CategoryValueSeverity',
334
+ HKCategoryTypeIdentifierBleedingAfterMenopause: 'CategoryValueVaginalBleeding',
334
335
  HKCategoryTypeIdentifierBleedingAfterPregnancy: 'CategoryValueVaginalBleeding',
335
336
  HKCategoryTypeIdentifierBleedingDuringPregnancy: 'CategoryValueVaginalBleeding',
336
337
  HKCategoryTypeIdentifierBloating: 'CategoryValueSeverity',
@@ -368,6 +369,7 @@ exports.CATEGORY_IDENTIFIER_VALUE_ENUMS = {
368
369
  HKCategoryTypeIdentifierLowerBackPain: 'CategoryValueSeverity',
369
370
  HKCategoryTypeIdentifierLowHeartRateEvent: 'CategoryValue',
370
371
  HKCategoryTypeIdentifierMemoryLapse: 'CategoryValueSeverity',
372
+ HKCategoryTypeIdentifierMenopausalState: 'CategoryValueMenopausalState',
371
373
  HKCategoryTypeIdentifierMenstrualFlow: 'CategoryValueMenstrualFlow',
372
374
  HKCategoryTypeIdentifierMindfulSession: 'CategoryValue',
373
375
  HKCategoryTypeIdentifierMoodChanges: 'CategoryValuePresence',
@@ -477,6 +479,12 @@ var CategoryValueLowCardioFitnessEvent;
477
479
  (function (CategoryValueLowCardioFitnessEvent) {
478
480
  CategoryValueLowCardioFitnessEvent[CategoryValueLowCardioFitnessEvent["lowFitness"] = 1] = "lowFitness";
479
481
  })(CategoryValueLowCardioFitnessEvent || (exports.CategoryValueLowCardioFitnessEvent = CategoryValueLowCardioFitnessEvent = {}));
482
+ var CategoryValueMenopausalState;
483
+ (function (CategoryValueMenopausalState) {
484
+ CategoryValueMenopausalState[CategoryValueMenopausalState["menopause"] = 1] = "menopause";
485
+ CategoryValueMenopausalState[CategoryValueMenopausalState["perimenopause"] = 2] = "perimenopause";
486
+ CategoryValueMenopausalState[CategoryValueMenopausalState["none"] = 3] = "none";
487
+ })(CategoryValueMenopausalState || (exports.CategoryValueMenopausalState = CategoryValueMenopausalState = {}));
480
488
  var CategoryValueMenstrualFlow;
481
489
  (function (CategoryValueMenstrualFlow) {
482
490
  CategoryValueMenstrualFlow[CategoryValueMenstrualFlow["unspecified"] = 1] = "unspecified";
@@ -726,6 +734,8 @@ var WorkoutActivityType;
726
734
  WorkoutActivityType[WorkoutActivityType["swimBikeRun"] = 82] = "swimBikeRun";
727
735
  WorkoutActivityType[WorkoutActivityType["transition"] = 83] = "transition";
728
736
  WorkoutActivityType[WorkoutActivityType["underwaterDiving"] = 84] = "underwaterDiving";
737
+ WorkoutActivityType[WorkoutActivityType["rest"] = 2998] = "rest";
738
+ WorkoutActivityType[WorkoutActivityType["group"] = 2999] = "group";
729
739
  WorkoutActivityType[WorkoutActivityType["other"] = 3000] = "other";
730
740
  })(WorkoutActivityType || (exports.WorkoutActivityType = WorkoutActivityType = {}));
731
741
  var WorkoutEventType;
@@ -18,7 +18,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
18
18
  };
19
19
  Object.defineProperty(exports, "__esModule", { value: true });
20
20
  exports.querySources = exports.queryWorkoutSamplesWithAnchor = exports.queryWorkoutSamples = exports.queryStatisticsCollectionForQuantitySeparateBySource = exports.queryStatisticsForQuantitySeparateBySource = exports.queryStatisticsCollectionForQuantity = exports.queryStatisticsForQuantity = exports.queryQuantitySamplesWithAnchor = exports.queryQuantitySamples = exports.queryElectrocardiogramSamplesWithAnchor = exports.queryElectrocardiogramSamples = exports.queryHeartbeatSeriesSamplesWithAnchor = exports.queryHeartbeatSeriesSamples = exports.queryCorrelationSamplesWithAnchor = exports.queryCorrelationSamples = exports.queryCategorySamplesWithAnchor = exports.queryCategorySamples = exports.isHealthDataAvailableAsync = exports.isHealthDataAvailable = exports.getWheelchairUse = exports.getRequestStatusForAuthorization = exports.getPreferredUnits = exports.getFitzpatrickSkinType = exports.getDateOfBirth = exports.getBloodType = exports.getBiologicalSex = exports.clearBackgroundTypes = exports.configureBackgroundTypes = exports.enableBackgroundDelivery = exports.disableBackgroundDelivery = exports.disableAllBackgroundDelivery = exports.requestPerObjectReadAuthorization = exports.authorizationStatusFor = exports.useSubscribeToQuantitySamples = exports.useSubscribeToChanges = exports.useSubscribeToCategorySamples = exports.useStatisticsForQuantity = exports.useSources = exports.useMostRecentWorkout = exports.useMostRecentQuantitySample = exports.useMostRecentCategorySample = exports.useIsHealthDataAvailable = exports.useHealthkitAuthorization = exports.subscribeToQuantitySamples = exports.subscribeToChanges = exports.subscribeToCategorySamples = exports.getPreferredUnit = exports.getMostRecentWorkout = exports.getMostRecentQuantitySample = exports.getMostRecentCategorySample = void 0;
21
- exports.getWheelchairUseAsync = exports.getFitzpatrickSkinTypeAsync = exports.getDateOfBirthAsync = exports.getBloodTypeAsync = exports.getBiologicalSexAsync = exports.currentAppSource = exports.queryMedicationEventsWithAnchor = exports.queryMedicationEvents = exports.queryMedications = exports.requestMedicationsAuthorization = exports.areObjectTypesAvailableAsync = exports.areObjectTypesAvailable = exports.isObjectTypeAvailableAsync = exports.isObjectTypeAvailable = exports.isQuantityCompatibleWithUnit = exports.saveStateOfMindSample = exports.queryStateOfMindSamplesWithAnchor = exports.queryStateOfMindSamples = exports.isProtectedDataAvailable = exports.startWatchApp = exports.saveWorkoutSample = exports.saveQuantitySample = exports.saveCorrelationSample = exports.saveCategorySample = exports.deleteObjects = exports.requestAuthorization = void 0;
21
+ exports.getWheelchairUseAsync = exports.getFitzpatrickSkinTypeAsync = exports.getDateOfBirthAsync = exports.getBloodTypeAsync = exports.getBiologicalSexAsync = exports.currentAppSource = exports.queryMedicationEventsWithAnchor = exports.queryMedicationEvents = exports.queryMedications = exports.requestMedicationsAuthorization = exports.areObjectTypesAvailableAsync = exports.areObjectTypesAvailable = exports.isObjectTypeAvailableAsync = exports.isObjectTypeAvailable = exports.isQuantityCompatibleWithUnit = exports.saveStateOfMindSample = exports.queryStateOfMindSamplesWithAnchor = exports.queryStateOfMindSamples = exports.isProtectedDataAvailableAsync = exports.isProtectedDataAvailable = exports.startWatchApp = exports.saveWorkoutSample = exports.saveQuantitySample = exports.saveCorrelationSample = exports.saveCategorySample = exports.deleteObjects = exports.requestAuthorization = void 0;
22
22
  const react_native_1 = require("react-native");
23
23
  const useHealthkitAuthorization_1 = __importDefault(require("./hooks/useHealthkitAuthorization"));
24
24
  exports.useHealthkitAuthorization = useHealthkitAuthorization_1.default;
@@ -129,6 +129,7 @@ exports.saveQuantitySample = modules_1.QuantityTypes.saveQuantitySample.bind(mod
129
129
  exports.saveWorkoutSample = WorkoutBindings.saveWorkoutSample;
130
130
  exports.startWatchApp = modules_1.Workouts.startWatchAppWithWorkoutConfiguration.bind(modules_1.Workouts);
131
131
  exports.isProtectedDataAvailable = modules_1.Core.isProtectedDataAvailable.bind(modules_1.Core);
132
+ exports.isProtectedDataAvailableAsync = modules_1.Core.isProtectedDataAvailableAsync.bind(modules_1.Core);
132
133
  exports.queryStateOfMindSamples = StateOfMindBindings.queryStateOfMindSamples;
133
134
  exports.queryStateOfMindSamplesWithAnchor = StateOfMindBindings.queryStateOfMindSamplesWithAnchor;
134
135
  exports.saveStateOfMindSample = StateOfMindBindings.saveStateOfMindSample;
@@ -205,6 +206,7 @@ exports.default = {
205
206
  subscribeToQuantitySamples: subscribeToQuantitySamples_1.subscribeToQuantitySamples,
206
207
  startWatchApp: exports.startWatchApp,
207
208
  isProtectedDataAvailable: exports.isProtectedDataAvailable,
209
+ isProtectedDataAvailableAsync: exports.isProtectedDataAvailableAsync,
208
210
  queryStateOfMindSamples: exports.queryStateOfMindSamples,
209
211
  queryStateOfMindSamplesWithAnchor: exports.queryStateOfMindSamplesWithAnchor,
210
212
  saveStateOfMindSample: exports.saveStateOfMindSample,
@@ -14,8 +14,8 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- exports.getWheelchairUseAsync = exports.getFitzpatrickSkinTypeAsync = exports.getDateOfBirthAsync = exports.getBloodTypeAsync = exports.getBiologicalSexAsync = exports.useStatisticsForQuantity = exports.useSources = exports.useIsHealthDataAvailable = exports.useHealthkitAuthorization = exports.useSubscribeToChanges = exports.useMostRecentWorkout = exports.getMostRecentWorkout = exports.saveStateOfMindSample = exports.queryCorrelationSamplesWithAnchor = exports.queryStateOfMindSamplesWithAnchor = exports.queryStateOfMindSamples = exports.startWatchApp = exports.saveWorkoutSample = exports.queryWorkoutSamplesWithAnchor = exports.queryWorkoutSamples = exports.queryElectrocardiogramSamplesWithAnchor = exports.queryElectrocardiogramSamples = exports.queryHeartbeatSeriesSamplesWithAnchor = exports.queryHeartbeatSeriesSamples = exports.saveCorrelationSample = exports.queryCorrelationSamples = exports.getWheelchairUse = exports.getFitzpatrickSkinType = exports.getDateOfBirth = exports.getBloodType = exports.getBiologicalSex = exports.areObjectTypesAvailableAsync = exports.areObjectTypesAvailable = exports.isObjectTypeAvailableAsync = exports.isObjectTypeAvailable = exports.isProtectedDataAvailable = exports.subscribeToChanges = exports.deleteObjects = exports.requestAuthorization = exports.querySources = exports.isHealthDataAvailableAsync = exports.isHealthDataAvailable = exports.getRequestStatusForAuthorization = exports.getPreferredUnits = exports.clearBackgroundTypes = exports.configureBackgroundTypes = exports.enableBackgroundDelivery = exports.disableBackgroundDelivery = exports.disableAllBackgroundDelivery = exports.authorizationStatusFor = void 0;
18
- exports.requestMedicationsAuthorization = exports.subscribeToCategorySamples = exports.requestPerObjectReadAuthorization = exports.useSubscribeToCategorySamples = exports.useSubscribeToQuantitySamples = exports.queryMedicationEventsWithAnchor = exports.queryMedicationEvents = exports.queryMedications = exports.currentAppSource = exports.subscribeToQuantitySamples = void 0;
17
+ exports.getFitzpatrickSkinTypeAsync = exports.getDateOfBirthAsync = exports.getBloodTypeAsync = exports.getBiologicalSexAsync = exports.useStatisticsForQuantity = exports.useSources = exports.useIsHealthDataAvailable = exports.useHealthkitAuthorization = exports.useSubscribeToChanges = exports.useMostRecentWorkout = exports.getMostRecentWorkout = exports.saveStateOfMindSample = exports.queryCorrelationSamplesWithAnchor = exports.queryStateOfMindSamplesWithAnchor = exports.queryStateOfMindSamples = exports.startWatchApp = exports.saveWorkoutSample = exports.queryWorkoutSamplesWithAnchor = exports.queryWorkoutSamples = exports.queryElectrocardiogramSamplesWithAnchor = exports.queryElectrocardiogramSamples = exports.queryHeartbeatSeriesSamplesWithAnchor = exports.queryHeartbeatSeriesSamples = exports.saveCorrelationSample = exports.queryCorrelationSamples = exports.getWheelchairUse = exports.getFitzpatrickSkinType = exports.getDateOfBirth = exports.getBloodType = exports.getBiologicalSex = exports.areObjectTypesAvailableAsync = exports.areObjectTypesAvailable = exports.isObjectTypeAvailableAsync = exports.isObjectTypeAvailable = exports.isProtectedDataAvailableAsync = exports.isProtectedDataAvailable = exports.subscribeToChanges = exports.deleteObjects = exports.requestAuthorization = exports.querySources = exports.isHealthDataAvailableAsync = exports.isHealthDataAvailable = exports.getRequestStatusForAuthorization = exports.getPreferredUnits = exports.clearBackgroundTypes = exports.configureBackgroundTypes = exports.enableBackgroundDelivery = exports.disableBackgroundDelivery = exports.disableAllBackgroundDelivery = exports.authorizationStatusFor = void 0;
18
+ exports.requestMedicationsAuthorization = exports.subscribeToCategorySamples = exports.requestPerObjectReadAuthorization = exports.useSubscribeToCategorySamples = exports.useSubscribeToQuantitySamples = exports.queryMedicationEventsWithAnchor = exports.queryMedicationEvents = exports.queryMedications = exports.currentAppSource = exports.subscribeToQuantitySamples = exports.getWheelchairUseAsync = void 0;
19
19
  exports.queryQuantitySamples = queryQuantitySamples;
20
20
  exports.queryQuantitySamplesWithAnchor = queryQuantitySamplesWithAnchor;
21
21
  exports.queryStatisticsForQuantity = queryStatisticsForQuantity;
@@ -67,6 +67,7 @@ exports.subscribeToChanges = UnavailableFnFromModule('subscribeToChanges', {
67
67
  remove: () => false,
68
68
  }); // Mocking the observer query UUID
69
69
  exports.isProtectedDataAvailable = UnavailableFnFromModule('isProtectedDataAvailable', false);
70
+ exports.isProtectedDataAvailableAsync = UnavailableFnFromModule('isProtectedDataAvailableAsync', Promise.resolve(false));
70
71
  exports.isObjectTypeAvailable = UnavailableFnFromModule('isObjectTypeAvailable', false);
71
72
  exports.isObjectTypeAvailableAsync = UnavailableFnFromModule('isObjectTypeAvailableAsync', Promise.resolve(false));
72
73
  exports.areObjectTypesAvailable = UnavailableFnFromModule('areObjectTypesAvailable', {});
@@ -331,6 +332,7 @@ const HealthkitModule = {
331
332
  subscribeToChanges: exports.subscribeToChanges,
332
333
  startWatchApp: exports.startWatchApp,
333
334
  isProtectedDataAvailable: exports.isProtectedDataAvailable,
335
+ isProtectedDataAvailableAsync: exports.isProtectedDataAvailableAsync,
334
336
  queryStateOfMindSamples: exports.queryStateOfMindSamples,
335
337
  queryStateOfMindSamplesWithAnchor: exports.queryStateOfMindSamplesWithAnchor,
336
338
  saveStateOfMindSample: exports.saveStateOfMindSample,
@@ -15,7 +15,6 @@ export const QUANTITY_IDENTIFIER_IOS_AVAILABILITY = {
15
15
  HKQuantityTypeIdentifierBasalEnergyBurned: '8.0',
16
16
  HKQuantityTypeIdentifierBloodAlcoholContent: '8.0',
17
17
  HKQuantityTypeIdentifierBloodGlucose: '8.0',
18
- HKQuantityTypeIdentifierBloodKetones: '8.0',
19
18
  HKQuantityTypeIdentifierBloodPressureDiastolic: '8.0',
20
19
  HKQuantityTypeIdentifierBloodPressureSystolic: '8.0',
21
20
  HKQuantityTypeIdentifierBodyFatPercentage: '8.0',
@@ -133,6 +132,7 @@ export const CATEGORY_IDENTIFIER_IOS_AVAILABILITY = {
133
132
  HKCategoryTypeIdentifierAppleWalkingSteadinessEvent: '15.0',
134
133
  HKCategoryTypeIdentifierAudioExposureEvent: '13.0',
135
134
  HKCategoryTypeIdentifierBladderIncontinence: '14.0',
135
+ HKCategoryTypeIdentifierBleedingAfterMenopause: '27.0',
136
136
  HKCategoryTypeIdentifierBleedingAfterPregnancy: '18.0',
137
137
  HKCategoryTypeIdentifierBleedingDuringPregnancy: '18.0',
138
138
  HKCategoryTypeIdentifierBloating: '13.6',
@@ -170,6 +170,7 @@ export const CATEGORY_IDENTIFIER_IOS_AVAILABILITY = {
170
170
  HKCategoryTypeIdentifierLowerBackPain: '13.6',
171
171
  HKCategoryTypeIdentifierLowHeartRateEvent: '12.2',
172
172
  HKCategoryTypeIdentifierMemoryLapse: '14.0',
173
+ HKCategoryTypeIdentifierMenopausalState: '27.0',
173
174
  HKCategoryTypeIdentifierMenstrualFlow: '9.0',
174
175
  HKCategoryTypeIdentifierMindfulSession: '10.0',
175
176
  HKCategoryTypeIdentifierMoodChanges: '13.6',
@@ -210,7 +211,6 @@ export const QUANTITY_IDENTIFIER_CANONICAL_UNITS = {
210
211
  HKQuantityTypeIdentifierBasalEnergyBurned: 'kcal',
211
212
  HKQuantityTypeIdentifierBloodAlcoholContent: '%',
212
213
  HKQuantityTypeIdentifierBloodGlucose: 'mg/dL',
213
- HKQuantityTypeIdentifierBloodKetones: 'mmol/L',
214
214
  HKQuantityTypeIdentifierBloodPressureDiastolic: 'mmHg',
215
215
  HKQuantityTypeIdentifierBloodPressureSystolic: 'mmHg',
216
216
  HKQuantityTypeIdentifierBodyFatPercentage: '%',
@@ -328,6 +328,7 @@ export const CATEGORY_IDENTIFIER_VALUE_ENUMS = {
328
328
  HKCategoryTypeIdentifierAppleWalkingSteadinessEvent: 'CategoryValueAppleWalkingSteadinessEvent',
329
329
  HKCategoryTypeIdentifierAudioExposureEvent: null,
330
330
  HKCategoryTypeIdentifierBladderIncontinence: 'CategoryValueSeverity',
331
+ HKCategoryTypeIdentifierBleedingAfterMenopause: 'CategoryValueVaginalBleeding',
331
332
  HKCategoryTypeIdentifierBleedingAfterPregnancy: 'CategoryValueVaginalBleeding',
332
333
  HKCategoryTypeIdentifierBleedingDuringPregnancy: 'CategoryValueVaginalBleeding',
333
334
  HKCategoryTypeIdentifierBloating: 'CategoryValueSeverity',
@@ -365,6 +366,7 @@ export const CATEGORY_IDENTIFIER_VALUE_ENUMS = {
365
366
  HKCategoryTypeIdentifierLowerBackPain: 'CategoryValueSeverity',
366
367
  HKCategoryTypeIdentifierLowHeartRateEvent: 'CategoryValue',
367
368
  HKCategoryTypeIdentifierMemoryLapse: 'CategoryValueSeverity',
369
+ HKCategoryTypeIdentifierMenopausalState: 'CategoryValueMenopausalState',
368
370
  HKCategoryTypeIdentifierMenstrualFlow: 'CategoryValueMenstrualFlow',
369
371
  HKCategoryTypeIdentifierMindfulSession: 'CategoryValue',
370
372
  HKCategoryTypeIdentifierMoodChanges: 'CategoryValuePresence',
@@ -474,6 +476,12 @@ export var CategoryValueLowCardioFitnessEvent;
474
476
  (function (CategoryValueLowCardioFitnessEvent) {
475
477
  CategoryValueLowCardioFitnessEvent[CategoryValueLowCardioFitnessEvent["lowFitness"] = 1] = "lowFitness";
476
478
  })(CategoryValueLowCardioFitnessEvent || (CategoryValueLowCardioFitnessEvent = {}));
479
+ export var CategoryValueMenopausalState;
480
+ (function (CategoryValueMenopausalState) {
481
+ CategoryValueMenopausalState[CategoryValueMenopausalState["menopause"] = 1] = "menopause";
482
+ CategoryValueMenopausalState[CategoryValueMenopausalState["perimenopause"] = 2] = "perimenopause";
483
+ CategoryValueMenopausalState[CategoryValueMenopausalState["none"] = 3] = "none";
484
+ })(CategoryValueMenopausalState || (CategoryValueMenopausalState = {}));
477
485
  export var CategoryValueMenstrualFlow;
478
486
  (function (CategoryValueMenstrualFlow) {
479
487
  CategoryValueMenstrualFlow[CategoryValueMenstrualFlow["unspecified"] = 1] = "unspecified";
@@ -723,6 +731,8 @@ export var WorkoutActivityType;
723
731
  WorkoutActivityType[WorkoutActivityType["swimBikeRun"] = 82] = "swimBikeRun";
724
732
  WorkoutActivityType[WorkoutActivityType["transition"] = 83] = "transition";
725
733
  WorkoutActivityType[WorkoutActivityType["underwaterDiving"] = 84] = "underwaterDiving";
734
+ WorkoutActivityType[WorkoutActivityType["rest"] = 2998] = "rest";
735
+ WorkoutActivityType[WorkoutActivityType["group"] = 2999] = "group";
726
736
  WorkoutActivityType[WorkoutActivityType["other"] = 3000] = "other";
727
737
  })(WorkoutActivityType || (WorkoutActivityType = {}));
728
738
  export var WorkoutEventType;
@@ -92,6 +92,7 @@ export const saveQuantitySample = QuantityTypes.saveQuantitySample.bind(Quantity
92
92
  export const saveWorkoutSample = WorkoutBindings.saveWorkoutSample;
93
93
  export const startWatchApp = Workouts.startWatchAppWithWorkoutConfiguration.bind(Workouts);
94
94
  export const isProtectedDataAvailable = Core.isProtectedDataAvailable.bind(Core);
95
+ export const isProtectedDataAvailableAsync = Core.isProtectedDataAvailableAsync.bind(Core);
95
96
  export const queryStateOfMindSamples = StateOfMindBindings.queryStateOfMindSamples;
96
97
  export const queryStateOfMindSamplesWithAnchor = StateOfMindBindings.queryStateOfMindSamplesWithAnchor;
97
98
  export const saveStateOfMindSample = StateOfMindBindings.saveStateOfMindSample;
@@ -168,6 +169,7 @@ export default {
168
169
  subscribeToQuantitySamples,
169
170
  startWatchApp,
170
171
  isProtectedDataAvailable,
172
+ isProtectedDataAvailableAsync,
171
173
  queryStateOfMindSamples,
172
174
  queryStateOfMindSamplesWithAnchor,
173
175
  saveStateOfMindSample,
@@ -33,6 +33,7 @@ export const subscribeToChanges = UnavailableFnFromModule('subscribeToChanges',
33
33
  remove: () => false,
34
34
  }); // Mocking the observer query UUID
35
35
  export const isProtectedDataAvailable = UnavailableFnFromModule('isProtectedDataAvailable', false);
36
+ export const isProtectedDataAvailableAsync = UnavailableFnFromModule('isProtectedDataAvailableAsync', Promise.resolve(false));
36
37
  export const isObjectTypeAvailable = UnavailableFnFromModule('isObjectTypeAvailable', false);
37
38
  export const isObjectTypeAvailableAsync = UnavailableFnFromModule('isObjectTypeAvailableAsync', Promise.resolve(false));
38
39
  export const areObjectTypesAvailable = UnavailableFnFromModule('areObjectTypesAvailable', {});
@@ -297,6 +298,7 @@ const HealthkitModule = {
297
298
  subscribeToChanges,
298
299
  startWatchApp,
299
300
  isProtectedDataAvailable,
301
+ isProtectedDataAvailableAsync,
300
302
  queryStateOfMindSamples,
301
303
  queryStateOfMindSamplesWithAnchor,
302
304
  saveStateOfMindSample,
@@ -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' | 'HKQuantityTypeIdentifierBloodKetones' | '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' | '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';
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' | '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";
@@ -137,6 +136,7 @@ export declare const CATEGORY_IDENTIFIER_IOS_AVAILABILITY: {
137
136
  readonly HKCategoryTypeIdentifierAppleWalkingSteadinessEvent: "15.0";
138
137
  readonly HKCategoryTypeIdentifierAudioExposureEvent: "13.0";
139
138
  readonly HKCategoryTypeIdentifierBladderIncontinence: "14.0";
139
+ readonly HKCategoryTypeIdentifierBleedingAfterMenopause: "27.0";
140
140
  readonly HKCategoryTypeIdentifierBleedingAfterPregnancy: "18.0";
141
141
  readonly HKCategoryTypeIdentifierBleedingDuringPregnancy: "18.0";
142
142
  readonly HKCategoryTypeIdentifierBloating: "13.6";
@@ -174,6 +174,7 @@ export declare const CATEGORY_IDENTIFIER_IOS_AVAILABILITY: {
174
174
  readonly HKCategoryTypeIdentifierLowerBackPain: "13.6";
175
175
  readonly HKCategoryTypeIdentifierLowHeartRateEvent: "12.2";
176
176
  readonly HKCategoryTypeIdentifierMemoryLapse: "14.0";
177
+ readonly HKCategoryTypeIdentifierMenopausalState: "27.0";
177
178
  readonly HKCategoryTypeIdentifierMenstrualFlow: "9.0";
178
179
  readonly HKCategoryTypeIdentifierMindfulSession: "10.0";
179
180
  readonly HKCategoryTypeIdentifierMoodChanges: "13.6";
@@ -214,7 +215,6 @@ export declare const QUANTITY_IDENTIFIER_CANONICAL_UNITS: {
214
215
  readonly HKQuantityTypeIdentifierBasalEnergyBurned: "kcal";
215
216
  readonly HKQuantityTypeIdentifierBloodAlcoholContent: "%";
216
217
  readonly HKQuantityTypeIdentifierBloodGlucose: "mg/dL";
217
- readonly HKQuantityTypeIdentifierBloodKetones: "mmol/L";
218
218
  readonly HKQuantityTypeIdentifierBloodPressureDiastolic: "mmHg";
219
219
  readonly HKQuantityTypeIdentifierBloodPressureSystolic: "mmHg";
220
220
  readonly HKQuantityTypeIdentifierBodyFatPercentage: "%";
@@ -332,6 +332,7 @@ export declare const CATEGORY_IDENTIFIER_VALUE_ENUMS: {
332
332
  readonly HKCategoryTypeIdentifierAppleWalkingSteadinessEvent: "CategoryValueAppleWalkingSteadinessEvent";
333
333
  readonly HKCategoryTypeIdentifierAudioExposureEvent: null;
334
334
  readonly HKCategoryTypeIdentifierBladderIncontinence: "CategoryValueSeverity";
335
+ readonly HKCategoryTypeIdentifierBleedingAfterMenopause: "CategoryValueVaginalBleeding";
335
336
  readonly HKCategoryTypeIdentifierBleedingAfterPregnancy: "CategoryValueVaginalBleeding";
336
337
  readonly HKCategoryTypeIdentifierBleedingDuringPregnancy: "CategoryValueVaginalBleeding";
337
338
  readonly HKCategoryTypeIdentifierBloating: "CategoryValueSeverity";
@@ -369,6 +370,7 @@ export declare const CATEGORY_IDENTIFIER_VALUE_ENUMS: {
369
370
  readonly HKCategoryTypeIdentifierLowerBackPain: "CategoryValueSeverity";
370
371
  readonly HKCategoryTypeIdentifierLowHeartRateEvent: "CategoryValue";
371
372
  readonly HKCategoryTypeIdentifierMemoryLapse: "CategoryValueSeverity";
373
+ readonly HKCategoryTypeIdentifierMenopausalState: "CategoryValueMenopausalState";
372
374
  readonly HKCategoryTypeIdentifierMenstrualFlow: "CategoryValueMenstrualFlow";
373
375
  readonly HKCategoryTypeIdentifierMindfulSession: "CategoryValue";
374
376
  readonly HKCategoryTypeIdentifierMoodChanges: "CategoryValuePresence";
@@ -465,6 +467,11 @@ export declare enum CategoryValueHeadphoneAudioExposureEvent {
465
467
  export declare enum CategoryValueLowCardioFitnessEvent {
466
468
  lowFitness = 1
467
469
  }
470
+ export declare enum CategoryValueMenopausalState {
471
+ menopause = 1,
472
+ perimenopause = 2,
473
+ none = 3
474
+ }
468
475
  export declare enum CategoryValueMenstrualFlow {
469
476
  unspecified = 1,
470
477
  light = 2,
@@ -693,6 +700,8 @@ export declare enum WorkoutActivityType {
693
700
  swimBikeRun = 82,
694
701
  transition = 83,
695
702
  underwaterDiving = 84,
703
+ rest = 2998,
704
+ group = 2999,
696
705
  other = 3000
697
706
  }
698
707
  export declare enum WorkoutEventType {
@@ -717,6 +726,7 @@ export interface CategoryValueByIdentifierMap {
717
726
  readonly HKCategoryTypeIdentifierAppleStandHour: CategoryValueAppleStandHour;
718
727
  readonly HKCategoryTypeIdentifierAppleWalkingSteadinessEvent: CategoryValueAppleWalkingSteadinessEvent;
719
728
  readonly HKCategoryTypeIdentifierBladderIncontinence: CategoryValueSeverity;
729
+ readonly HKCategoryTypeIdentifierBleedingAfterMenopause: CategoryValueVaginalBleeding;
720
730
  readonly HKCategoryTypeIdentifierBleedingAfterPregnancy: CategoryValueVaginalBleeding;
721
731
  readonly HKCategoryTypeIdentifierBleedingDuringPregnancy: CategoryValueVaginalBleeding;
722
732
  readonly HKCategoryTypeIdentifierBloating: CategoryValueSeverity;
@@ -754,6 +764,7 @@ export interface CategoryValueByIdentifierMap {
754
764
  readonly HKCategoryTypeIdentifierLowerBackPain: CategoryValueSeverity;
755
765
  readonly HKCategoryTypeIdentifierLowHeartRateEvent: CategoryValue;
756
766
  readonly HKCategoryTypeIdentifierMemoryLapse: CategoryValueSeverity;
767
+ readonly HKCategoryTypeIdentifierMenopausalState: CategoryValueMenopausalState;
757
768
  readonly HKCategoryTypeIdentifierMenstrualFlow: CategoryValueMenstrualFlow;
758
769
  readonly HKCategoryTypeIdentifierMindfulSession: CategoryValue;
759
770
  readonly HKCategoryTypeIdentifierMoodChanges: CategoryValuePresence;
@@ -874,7 +885,7 @@ export interface CategorySpecificMetadataByIdentifierMap {
874
885
  readonly HKCategoryTypeIdentifierMenstrualFlow: Pick<CategoryTypedMetadata, 'HKMenstrualCycleStart'>;
875
886
  readonly HKCategoryTypeIdentifierSexualActivity: Pick<CategoryTypedMetadata, 'HKSexualActivityProtectionUsed'>;
876
887
  }
877
- export type CategoryTypedMetadataForIdentifierGenerated<T extends CategoryTypeIdentifier = CategoryTypeIdentifier> = KnownSampleMetadata & (T extends keyof CategorySpecificMetadataByIdentifierMap ? CategorySpecificMetadataByIdentifierMap[T] : Record<string, never>);
888
+ export type CategoryTypedMetadataForIdentifierGenerated<T extends CategoryTypeIdentifier = CategoryTypeIdentifier> = KnownSampleMetadata & (T extends keyof CategorySpecificMetadataByIdentifierMap ? CategorySpecificMetadataByIdentifierMap[T] : unknown);
878
889
  export interface QuantitySpecificMetadataByIdentifierMap {
879
890
  readonly HKQuantityTypeIdentifierBasalBodyTemperature: Pick<QuantityTypedMetadata, 'HKBodyTemperatureSensorLocation'>;
880
891
  readonly HKQuantityTypeIdentifierBloodGlucose: Pick<QuantityTypedMetadata, 'HKBloodGlucoseMealTime'>;
@@ -882,7 +893,7 @@ export interface QuantitySpecificMetadataByIdentifierMap {
882
893
  readonly HKQuantityTypeIdentifierInsulinDelivery: Pick<QuantityTypedMetadata, 'HKInsulinDeliveryReason'>;
883
894
  readonly HKQuantityTypeIdentifierVO2Max: Pick<QuantityTypedMetadata, 'HKVO2MaxTestType'>;
884
895
  }
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] : Record<string, never>);
896
+ 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
897
  export interface QuantityUnitByIdentifierMap {
887
898
  readonly HKQuantityTypeIdentifierActiveEnergyBurned: EnergyUnit;
888
899
  readonly HKQuantityTypeIdentifierAppleExerciseTime: TimeUnit;
@@ -896,7 +907,6 @@ export interface QuantityUnitByIdentifierMap {
896
907
  readonly HKQuantityTypeIdentifierBasalEnergyBurned: EnergyUnit;
897
908
  readonly HKQuantityTypeIdentifierBloodAlcoholContent: '%';
898
909
  readonly HKQuantityTypeIdentifierBloodGlucose: BloodGlucoseUnit;
899
- readonly HKQuantityTypeIdentifierBloodKetones: BloodGlucoseUnit;
900
910
  readonly HKQuantityTypeIdentifierBloodPressureDiastolic: PressureUnit;
901
911
  readonly HKQuantityTypeIdentifierBloodPressureSystolic: PressureUnit;
902
912
  readonly HKQuantityTypeIdentifierBodyFatPercentage: '%';
@@ -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>;
@@ -85,6 +85,7 @@ export declare const saveQuantitySample: <T extends import("./types").QuantityTy
85
85
  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
86
  export declare const startWatchApp: (workoutConfiguration: import("./types").WorkoutConfiguration) => Promise<boolean>;
87
87
  export declare const isProtectedDataAvailable: () => boolean;
88
+ export declare const isProtectedDataAvailableAsync: () => Promise<boolean>;
88
89
  export declare const queryStateOfMindSamples: BoundMethod<(options: import("./types").QueryOptionsWithSortOrder) => Promise<readonly import("./types").StateOfMindSample[]>, Promise<readonly StateOfMindSampleTyped[]>>;
89
90
  export declare const queryStateOfMindSamplesWithAnchor: BoundMethod<(options: import("./types").QueryOptionsWithAnchor) => Promise<import("./types").StateOfMindSamplesWithAnchorResponse>, Promise<StateOfMindSamplesWithAnchorResponseTyped>>;
90
91
  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>>;
@@ -165,6 +166,7 @@ declare const _default: {
165
166
  };
166
167
  startWatchApp: (workoutConfiguration: import("./types").WorkoutConfiguration) => Promise<boolean>;
167
168
  isProtectedDataAvailable: () => boolean;
169
+ isProtectedDataAvailableAsync: () => Promise<boolean>;
168
170
  queryStateOfMindSamples: BoundMethod<(options: import("./types").QueryOptionsWithSortOrder) => Promise<readonly import("./types").StateOfMindSample[]>, Promise<readonly StateOfMindSampleTyped[]>>;
169
171
  queryStateOfMindSamplesWithAnchor: BoundMethod<(options: import("./types").QueryOptionsWithAnchor) => Promise<import("./types").StateOfMindSamplesWithAnchorResponse>, Promise<StateOfMindSamplesWithAnchorResponseTyped>>;
170
172
  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>>;