@kingstinct/react-native-healthkit 14.1.0 → 16.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (123) hide show
  1. package/README.md +37 -3
  2. package/ReactNativeHealthkit.podspec +11 -7
  3. package/app.plugin.js +33 -94
  4. package/app.plugin.ts +29 -104
  5. package/ios/CategoryTypeModule.swift +1 -0
  6. package/ios/CharacteristicTypeModule.swift +7 -6
  7. package/ios/Constants.swift +9 -10
  8. package/ios/CoreModule.swift +77 -42
  9. package/ios/CorrelationTypeModule.swift +3 -2
  10. package/ios/ElectrocardiogramModule.swift +4 -3
  11. package/ios/HeartbeatSeriesModule.swift +4 -3
  12. package/ios/Helpers.swift +11 -216
  13. package/ios/MedicationModule.swift +9 -8
  14. package/ios/MemoryEstimation.swift +84 -0
  15. package/ios/PredicateHelpers.swift +16 -86
  16. package/ios/QuantityTypeModule.swift +37 -28
  17. package/ios/Serializers.swift +34 -70
  18. package/ios/SourceProxy.swift +15 -5
  19. package/ios/StateOfMindModule.swift +3 -2
  20. package/ios/WorkoutProxy.swift +31 -13
  21. package/ios/WorkoutsModule.swift +4 -3
  22. package/lib/commonjs/generated/healthkit.generated.js +15 -3
  23. package/lib/commonjs/healthkit.ios.js +6 -2
  24. package/lib/commonjs/healthkit.js +24 -79
  25. package/lib/commonjs/types/Auth.js +3 -18
  26. package/lib/commonjs/types/Background.js +2 -10
  27. package/lib/commonjs/types/QueryOptions.js +2 -17
  28. package/lib/module/generated/healthkit.generated.js +14 -2
  29. package/lib/module/healthkit.ios.js +4 -0
  30. package/lib/module/healthkit.js +22 -77
  31. package/lib/module/types/Auth.js +1 -18
  32. package/lib/module/types/Background.js +1 -10
  33. package/lib/module/types/QueryOptions.js +1 -17
  34. package/lib/typescript/generated/healthkit.generated.d.ts +20 -7
  35. package/lib/typescript/healthkit.d.ts +4 -2
  36. package/lib/typescript/healthkit.ios.d.ts +13 -9
  37. package/lib/typescript/specs/CoreModule.nitro.d.ts +22 -4
  38. package/lib/typescript/specs/SourceProxy.nitro.d.ts +2 -5
  39. package/lib/typescript/types/Auth.d.ts +1 -16
  40. package/lib/typescript/types/Background.d.ts +1 -9
  41. package/lib/typescript/types/Device.d.ts +1 -13
  42. package/lib/typescript/types/QuantityType.d.ts +3 -3
  43. package/lib/typescript/types/QueryOptions.d.ts +3 -37
  44. package/lib/typescript/types/Shared.d.ts +2 -25
  45. package/lib/typescript/types/Source.d.ts +1 -10
  46. package/lib/typescript/types/Subscriptions.d.ts +2 -3
  47. package/lib/typescript/types/Units.d.ts +1 -1
  48. package/nitrogen/generated/ios/ReactNativeHealthkit-Swift-Cxx-Bridge.cpp +24 -16
  49. package/nitrogen/generated/ios/ReactNativeHealthkit-Swift-Cxx-Bridge.hpp +91 -12
  50. package/nitrogen/generated/ios/c++/HybridCategoryTypeModuleSpecSwift.hpp +8 -5
  51. package/nitrogen/generated/ios/c++/HybridCoreModuleSpecSwift.hpp +8 -0
  52. package/nitrogen/generated/ios/c++/HybridCorrelationTypeModuleSpecSwift.hpp +8 -5
  53. package/nitrogen/generated/ios/c++/HybridElectrocardiogramModuleSpecSwift.hpp +8 -5
  54. package/nitrogen/generated/ios/c++/HybridHeartbeatSeriesModuleSpecSwift.hpp +8 -5
  55. package/nitrogen/generated/ios/c++/HybridMedicationModuleSpecSwift.hpp +8 -5
  56. package/nitrogen/generated/ios/c++/HybridQuantityTypeModuleSpecSwift.hpp +8 -5
  57. package/nitrogen/generated/ios/c++/HybridStateOfMindModuleSpecSwift.hpp +8 -5
  58. package/nitrogen/generated/ios/c++/HybridWorkoutProxySpecSwift.hpp +3 -4
  59. package/nitrogen/generated/ios/c++/HybridWorkoutsModuleSpecSwift.hpp +6 -3
  60. package/nitrogen/generated/ios/swift/CategorySample.swift +8 -8
  61. package/nitrogen/generated/ios/swift/CategoryTypeIdentifier.swift +8 -0
  62. package/nitrogen/generated/ios/swift/CategoryTypeIdentifierWriteable.swift +8 -0
  63. package/nitrogen/generated/ios/swift/CorrelationSample.swift +8 -8
  64. package/nitrogen/generated/ios/swift/ElectrocardiogramSample.swift +8 -8
  65. package/nitrogen/generated/ios/swift/Func_void_std__unordered_map_std__string__std__chrono__system_clock__time_point_.swift +54 -0
  66. package/nitrogen/generated/ios/swift/HeartbeatSeriesSample.swift +8 -8
  67. package/nitrogen/generated/ios/swift/HybridCoreModuleSpec.swift +1 -0
  68. package/nitrogen/generated/ios/swift/HybridCoreModuleSpec_cxx.swift +25 -0
  69. package/nitrogen/generated/ios/swift/MedicationDoseEvent.swift +8 -8
  70. package/nitrogen/generated/ios/swift/ObjectTypeIdentifier.swift +12 -4
  71. package/nitrogen/generated/ios/swift/QuantitySample.swift +8 -8
  72. package/nitrogen/generated/ios/swift/QuantityTypeIdentifier.swift +4 -4
  73. package/nitrogen/generated/ios/swift/QuantityTypeIdentifierWriteable.swift +4 -4
  74. package/nitrogen/generated/ios/swift/QueryStatisticsResponse.swift +6 -13
  75. package/nitrogen/generated/ios/swift/QueryStatisticsResponseFromSingleSource.swift +4 -11
  76. package/nitrogen/generated/ios/swift/SampleTypeIdentifier.swift +12 -4
  77. package/nitrogen/generated/ios/swift/SampleTypeIdentifierWriteable.swift +12 -4
  78. package/nitrogen/generated/ios/swift/SourceRevision.swift +4 -11
  79. package/nitrogen/generated/ios/swift/StateOfMindSample.swift +8 -8
  80. package/nitrogen/generated/ios/swift/WorkoutActivityType.swift +8 -0
  81. package/nitrogen/generated/shared/c++/CategorySample.hpp +7 -7
  82. package/nitrogen/generated/shared/c++/CategoryTypeIdentifier.hpp +67 -59
  83. package/nitrogen/generated/shared/c++/CategoryTypeIdentifierWriteable.hpp +67 -59
  84. package/nitrogen/generated/shared/c++/CorrelationSample.hpp +7 -7
  85. package/nitrogen/generated/shared/c++/ElectrocardiogramSample.hpp +7 -7
  86. package/nitrogen/generated/shared/c++/HeartbeatSeriesSample.hpp +7 -7
  87. package/nitrogen/generated/shared/c++/HybridCoreModuleSpec.cpp +1 -0
  88. package/nitrogen/generated/shared/c++/HybridCoreModuleSpec.hpp +3 -1
  89. package/nitrogen/generated/shared/c++/MedicationDoseEvent.hpp +7 -7
  90. package/nitrogen/generated/shared/c++/ObjectTypeIdentifier.hpp +206 -198
  91. package/nitrogen/generated/shared/c++/QuantitySample.hpp +7 -7
  92. package/nitrogen/generated/shared/c++/QuantityTypeIdentifier.hpp +73 -73
  93. package/nitrogen/generated/shared/c++/QuantityTypeIdentifierWriteable.hpp +73 -73
  94. package/nitrogen/generated/shared/c++/QueryStatisticsResponse.hpp +8 -9
  95. package/nitrogen/generated/shared/c++/QueryStatisticsResponseFromSingleSource.hpp +8 -9
  96. package/nitrogen/generated/shared/c++/SampleTypeIdentifier.hpp +199 -191
  97. package/nitrogen/generated/shared/c++/SampleTypeIdentifierWriteable.hpp +193 -185
  98. package/nitrogen/generated/shared/c++/SourceRevision.hpp +8 -9
  99. package/nitrogen/generated/shared/c++/StateOfMindSample.hpp +7 -7
  100. package/nitrogen/generated/shared/c++/WorkoutActivityType.hpp +4 -0
  101. package/package.json +8 -3
  102. package/src/generated/healthkit-schema.json +53 -8
  103. package/src/generated/healthkit.generated.ts +22 -6
  104. package/src/healthkit.ios.ts +6 -0
  105. package/src/healthkit.ts +32 -84
  106. package/src/specs/CoreModule.nitro.ts +25 -4
  107. package/src/specs/SourceProxy.nitro.ts +2 -4
  108. package/src/test-setup.ts +1 -0
  109. package/src/type-tests/generated-typing.ts +30 -8
  110. package/src/types/Auth.ts +4 -17
  111. package/src/types/Background.ts +1 -9
  112. package/src/types/Device.ts +1 -13
  113. package/src/types/QuantityType.ts +3 -3
  114. package/src/types/QueryOptions.ts +7 -65
  115. package/src/types/Shared.ts +7 -28
  116. package/src/types/Source.ts +1 -11
  117. package/src/types/Subscriptions.ts +2 -3
  118. package/src/types/Units.ts +1 -1
  119. package/ios/BackgroundDeliveryManager.swift +0 -277
  120. package/ios/Bridge.h +0 -10
  121. package/ios/ExceptionCatcher.h +0 -5
  122. package/ios/ExceptionCatcher.mm +0 -32
  123. package/ios/module.modulemap +0 -5
@@ -43,8 +43,6 @@ public extension QuantityTypeIdentifier {
43
43
  self = .hkquantitytypeidentifierbloodalcoholcontent
44
44
  case "HKQuantityTypeIdentifierBloodGlucose":
45
45
  self = .hkquantitytypeidentifierbloodglucose
46
- case "HKQuantityTypeIdentifierBloodKetones":
47
- self = .hkquantitytypeidentifierbloodketones
48
46
  case "HKQuantityTypeIdentifierBloodPressureDiastolic":
49
47
  self = .hkquantitytypeidentifierbloodpressurediastolic
50
48
  case "HKQuantityTypeIdentifierBloodPressureSystolic":
@@ -183,6 +181,8 @@ public extension QuantityTypeIdentifier {
183
181
  self = .hkquantitytypeidentifierheartrate
184
182
  case "HKQuantityTypeIdentifierHeartRateRecoveryOneMinute":
185
183
  self = .hkquantitytypeidentifierheartraterecoveryoneminute
184
+ case "HKQuantityTypeIdentifierHeartRateVariabilityRMSSD":
185
+ self = .hkquantitytypeidentifierheartratevariabilityrmssd
186
186
  case "HKQuantityTypeIdentifierHeartRateVariabilitySDNN":
187
187
  self = .hkquantitytypeidentifierheartratevariabilitysdnn
188
188
  case "HKQuantityTypeIdentifierHeight":
@@ -295,8 +295,6 @@ public extension QuantityTypeIdentifier {
295
295
  return "HKQuantityTypeIdentifierBloodAlcoholContent"
296
296
  case .hkquantitytypeidentifierbloodglucose:
297
297
  return "HKQuantityTypeIdentifierBloodGlucose"
298
- case .hkquantitytypeidentifierbloodketones:
299
- return "HKQuantityTypeIdentifierBloodKetones"
300
298
  case .hkquantitytypeidentifierbloodpressurediastolic:
301
299
  return "HKQuantityTypeIdentifierBloodPressureDiastolic"
302
300
  case .hkquantitytypeidentifierbloodpressuresystolic:
@@ -435,6 +433,8 @@ public extension QuantityTypeIdentifier {
435
433
  return "HKQuantityTypeIdentifierHeartRate"
436
434
  case .hkquantitytypeidentifierheartraterecoveryoneminute:
437
435
  return "HKQuantityTypeIdentifierHeartRateRecoveryOneMinute"
436
+ case .hkquantitytypeidentifierheartratevariabilityrmssd:
437
+ return "HKQuantityTypeIdentifierHeartRateVariabilityRMSSD"
438
438
  case .hkquantitytypeidentifierheartratevariabilitysdnn:
439
439
  return "HKQuantityTypeIdentifierHeartRateVariabilitySDNN"
440
440
  case .hkquantitytypeidentifierheight:
@@ -33,8 +33,6 @@ public extension QuantityTypeIdentifierWriteable {
33
33
  self = .hkquantitytypeidentifierbloodalcoholcontent
34
34
  case "HKQuantityTypeIdentifierBloodGlucose":
35
35
  self = .hkquantitytypeidentifierbloodglucose
36
- case "HKQuantityTypeIdentifierBloodKetones":
37
- self = .hkquantitytypeidentifierbloodketones
38
36
  case "HKQuantityTypeIdentifierBloodPressureDiastolic":
39
37
  self = .hkquantitytypeidentifierbloodpressurediastolic
40
38
  case "HKQuantityTypeIdentifierBloodPressureSystolic":
@@ -173,6 +171,8 @@ public extension QuantityTypeIdentifierWriteable {
173
171
  self = .hkquantitytypeidentifierheartrate
174
172
  case "HKQuantityTypeIdentifierHeartRateRecoveryOneMinute":
175
173
  self = .hkquantitytypeidentifierheartraterecoveryoneminute
174
+ case "HKQuantityTypeIdentifierHeartRateVariabilityRMSSD":
175
+ self = .hkquantitytypeidentifierheartratevariabilityrmssd
176
176
  case "HKQuantityTypeIdentifierHeartRateVariabilitySDNN":
177
177
  self = .hkquantitytypeidentifierheartratevariabilitysdnn
178
178
  case "HKQuantityTypeIdentifierHeight":
@@ -275,8 +275,6 @@ public extension QuantityTypeIdentifierWriteable {
275
275
  return "HKQuantityTypeIdentifierBloodAlcoholContent"
276
276
  case .hkquantitytypeidentifierbloodglucose:
277
277
  return "HKQuantityTypeIdentifierBloodGlucose"
278
- case .hkquantitytypeidentifierbloodketones:
279
- return "HKQuantityTypeIdentifierBloodKetones"
280
278
  case .hkquantitytypeidentifierbloodpressurediastolic:
281
279
  return "HKQuantityTypeIdentifierBloodPressureDiastolic"
282
280
  case .hkquantitytypeidentifierbloodpressuresystolic:
@@ -415,6 +413,8 @@ public extension QuantityTypeIdentifierWriteable {
415
413
  return "HKQuantityTypeIdentifierHeartRate"
416
414
  case .hkquantitytypeidentifierheartraterecoveryoneminute:
417
415
  return "HKQuantityTypeIdentifierHeartRateRecoveryOneMinute"
416
+ case .hkquantitytypeidentifierheartratevariabilityrmssd:
417
+ return "HKQuantityTypeIdentifierHeartRateVariabilityRMSSD"
418
418
  case .hkquantitytypeidentifierheartratevariabilitysdnn:
419
419
  return "HKQuantityTypeIdentifierHeartRateVariabilitySDNN"
420
420
  case .hkquantitytypeidentifierheight:
@@ -18,7 +18,7 @@ public extension QueryStatisticsResponse {
18
18
  /**
19
19
  * Create a new instance of `QueryStatisticsResponse`.
20
20
  */
21
- init(averageQuantity: Quantity?, maximumQuantity: Quantity?, minimumQuantity: Quantity?, sumQuantity: Quantity?, mostRecentQuantity: Quantity?, mostRecentQuantityDateInterval: QuantityDateInterval?, duration: Quantity?, startDate: Date?, endDate: Date?, sources: [(any HybridSourceProxySpec)]) {
21
+ init(averageQuantity: Quantity?, maximumQuantity: Quantity?, minimumQuantity: Quantity?, sumQuantity: Quantity?, mostRecentQuantity: Quantity?, mostRecentQuantityDateInterval: QuantityDateInterval?, duration: Quantity?, startDate: Date?, endDate: Date?, sources: [Source]) {
22
22
  self.init({ () -> bridge.std__optional_Quantity_ in
23
23
  if let __unwrappedValue = averageQuantity {
24
24
  return bridge.create_std__optional_Quantity_(__unwrappedValue)
@@ -73,13 +73,10 @@ public extension QueryStatisticsResponse {
73
73
  } else {
74
74
  return .init()
75
75
  }
76
- }(), { () -> bridge.std__vector_std__shared_ptr_HybridSourceProxySpec__ in
77
- var __vector = bridge.create_std__vector_std__shared_ptr_HybridSourceProxySpec__(sources.count)
76
+ }(), { () -> bridge.std__vector_Source_ in
77
+ var __vector = bridge.create_std__vector_Source_(sources.count)
78
78
  for __item in sources {
79
- __vector.push_back({ () -> bridge.std__shared_ptr_HybridSourceProxySpec_ in
80
- let __cxxWrapped = __item.getCxxWrapper()
81
- return __cxxWrapped.getCxxPart()
82
- }())
79
+ __vector.push_back(__item)
83
80
  }
84
81
  return __vector
85
82
  }())
@@ -145,11 +142,7 @@ public extension QueryStatisticsResponse {
145
142
  }
146
143
 
147
144
  @inline(__always)
148
- var sources: [(any HybridSourceProxySpec)] {
149
- return self.__sources.map({ __item in { () -> any HybridSourceProxySpec in
150
- let __unsafePointer = bridge.get_std__shared_ptr_HybridSourceProxySpec_(__item)
151
- let __instance = HybridSourceProxySpec_cxx.fromUnsafe(__unsafePointer)
152
- return __instance.getHybridSourceProxySpec()
153
- }() })
145
+ var sources: [Source] {
146
+ return self.__sources.map({ __item in __item })
154
147
  }
155
148
  }
@@ -18,11 +18,8 @@ public extension QueryStatisticsResponseFromSingleSource {
18
18
  /**
19
19
  * Create a new instance of `QueryStatisticsResponseFromSingleSource`.
20
20
  */
21
- init(source: (any HybridSourceProxySpec), startDate: Date?, endDate: Date?, duration: Quantity?, averageQuantity: Quantity?, maximumQuantity: Quantity?, minimumQuantity: Quantity?, sumQuantity: Quantity?, mostRecentQuantity: Quantity?, mostRecentQuantityDateInterval: QuantityDateInterval?) {
22
- self.init({ () -> bridge.std__shared_ptr_HybridSourceProxySpec_ in
23
- let __cxxWrapped = source.getCxxWrapper()
24
- return __cxxWrapped.getCxxPart()
25
- }(), { () -> bridge.std__optional_std__chrono__system_clock__time_point_ in
21
+ init(source: Source, startDate: Date?, endDate: Date?, duration: Quantity?, averageQuantity: Quantity?, maximumQuantity: Quantity?, minimumQuantity: Quantity?, sumQuantity: Quantity?, mostRecentQuantity: Quantity?, mostRecentQuantityDateInterval: QuantityDateInterval?) {
22
+ self.init(source, { () -> bridge.std__optional_std__chrono__system_clock__time_point_ in
26
23
  if let __unwrappedValue = startDate {
27
24
  return bridge.create_std__optional_std__chrono__system_clock__time_point_(__unwrappedValue.toCpp())
28
25
  } else {
@@ -80,12 +77,8 @@ public extension QueryStatisticsResponseFromSingleSource {
80
77
  }
81
78
 
82
79
  @inline(__always)
83
- var source: (any HybridSourceProxySpec) {
84
- return { () -> any HybridSourceProxySpec in
85
- let __unsafePointer = bridge.get_std__shared_ptr_HybridSourceProxySpec_(self.__source)
86
- let __instance = HybridSourceProxySpec_cxx.fromUnsafe(__unsafePointer)
87
- return __instance.getHybridSourceProxySpec()
88
- }()
80
+ var source: Source {
81
+ return self.__source
89
82
  }
90
83
 
91
84
  @inline(__always)
@@ -39,6 +39,8 @@ public extension SampleTypeIdentifier {
39
39
  self = .hkcategorytypeidentifieraudioexposureevent
40
40
  case "HKCategoryTypeIdentifierBladderIncontinence":
41
41
  self = .hkcategorytypeidentifierbladderincontinence
42
+ case "HKCategoryTypeIdentifierBleedingAfterMenopause":
43
+ self = .hkcategorytypeidentifierbleedingaftermenopause
42
44
  case "HKCategoryTypeIdentifierBleedingAfterPregnancy":
43
45
  self = .hkcategorytypeidentifierbleedingafterpregnancy
44
46
  case "HKCategoryTypeIdentifierBleedingDuringPregnancy":
@@ -105,6 +107,8 @@ public extension SampleTypeIdentifier {
105
107
  self = .hkcategorytypeidentifierlowerbackpain
106
108
  case "HKCategoryTypeIdentifierMemoryLapse":
107
109
  self = .hkcategorytypeidentifiermemorylapse
110
+ case "HKCategoryTypeIdentifierMenopausalState":
111
+ self = .hkcategorytypeidentifiermenopausalstate
108
112
  case "HKCategoryTypeIdentifierMenstrualFlow":
109
113
  self = .hkcategorytypeidentifiermenstrualflow
110
114
  case "HKCategoryTypeIdentifierMindfulSession":
@@ -187,8 +191,6 @@ public extension SampleTypeIdentifier {
187
191
  self = .hkquantitytypeidentifierbloodalcoholcontent
188
192
  case "HKQuantityTypeIdentifierBloodGlucose":
189
193
  self = .hkquantitytypeidentifierbloodglucose
190
- case "HKQuantityTypeIdentifierBloodKetones":
191
- self = .hkquantitytypeidentifierbloodketones
192
194
  case "HKQuantityTypeIdentifierBloodPressureDiastolic":
193
195
  self = .hkquantitytypeidentifierbloodpressurediastolic
194
196
  case "HKQuantityTypeIdentifierBloodPressureSystolic":
@@ -327,6 +329,8 @@ public extension SampleTypeIdentifier {
327
329
  self = .hkquantitytypeidentifierheartrate
328
330
  case "HKQuantityTypeIdentifierHeartRateRecoveryOneMinute":
329
331
  self = .hkquantitytypeidentifierheartraterecoveryoneminute
332
+ case "HKQuantityTypeIdentifierHeartRateVariabilityRMSSD":
333
+ self = .hkquantitytypeidentifierheartratevariabilityrmssd
330
334
  case "HKQuantityTypeIdentifierHeartRateVariabilitySDNN":
331
335
  self = .hkquantitytypeidentifierheartratevariabilitysdnn
332
336
  case "HKQuantityTypeIdentifierHeight":
@@ -447,6 +451,8 @@ public extension SampleTypeIdentifier {
447
451
  return "HKCategoryTypeIdentifierAudioExposureEvent"
448
452
  case .hkcategorytypeidentifierbladderincontinence:
449
453
  return "HKCategoryTypeIdentifierBladderIncontinence"
454
+ case .hkcategorytypeidentifierbleedingaftermenopause:
455
+ return "HKCategoryTypeIdentifierBleedingAfterMenopause"
450
456
  case .hkcategorytypeidentifierbleedingafterpregnancy:
451
457
  return "HKCategoryTypeIdentifierBleedingAfterPregnancy"
452
458
  case .hkcategorytypeidentifierbleedingduringpregnancy:
@@ -513,6 +519,8 @@ public extension SampleTypeIdentifier {
513
519
  return "HKCategoryTypeIdentifierLowerBackPain"
514
520
  case .hkcategorytypeidentifiermemorylapse:
515
521
  return "HKCategoryTypeIdentifierMemoryLapse"
522
+ case .hkcategorytypeidentifiermenopausalstate:
523
+ return "HKCategoryTypeIdentifierMenopausalState"
516
524
  case .hkcategorytypeidentifiermenstrualflow:
517
525
  return "HKCategoryTypeIdentifierMenstrualFlow"
518
526
  case .hkcategorytypeidentifiermindfulsession:
@@ -595,8 +603,6 @@ public extension SampleTypeIdentifier {
595
603
  return "HKQuantityTypeIdentifierBloodAlcoholContent"
596
604
  case .hkquantitytypeidentifierbloodglucose:
597
605
  return "HKQuantityTypeIdentifierBloodGlucose"
598
- case .hkquantitytypeidentifierbloodketones:
599
- return "HKQuantityTypeIdentifierBloodKetones"
600
606
  case .hkquantitytypeidentifierbloodpressurediastolic:
601
607
  return "HKQuantityTypeIdentifierBloodPressureDiastolic"
602
608
  case .hkquantitytypeidentifierbloodpressuresystolic:
@@ -735,6 +741,8 @@ public extension SampleTypeIdentifier {
735
741
  return "HKQuantityTypeIdentifierHeartRate"
736
742
  case .hkquantitytypeidentifierheartraterecoveryoneminute:
737
743
  return "HKQuantityTypeIdentifierHeartRateRecoveryOneMinute"
744
+ case .hkquantitytypeidentifierheartratevariabilityrmssd:
745
+ return "HKQuantityTypeIdentifierHeartRateVariabilityRMSSD"
738
746
  case .hkquantitytypeidentifierheartratevariabilitysdnn:
739
747
  return "HKQuantityTypeIdentifierHeartRateVariabilitySDNN"
740
748
  case .hkquantitytypeidentifierheight:
@@ -29,6 +29,8 @@ public extension SampleTypeIdentifierWriteable {
29
29
  self = .hkcategorytypeidentifieraudioexposureevent
30
30
  case "HKCategoryTypeIdentifierBladderIncontinence":
31
31
  self = .hkcategorytypeidentifierbladderincontinence
32
+ case "HKCategoryTypeIdentifierBleedingAfterMenopause":
33
+ self = .hkcategorytypeidentifierbleedingaftermenopause
32
34
  case "HKCategoryTypeIdentifierBleedingAfterPregnancy":
33
35
  self = .hkcategorytypeidentifierbleedingafterpregnancy
34
36
  case "HKCategoryTypeIdentifierBleedingDuringPregnancy":
@@ -95,6 +97,8 @@ public extension SampleTypeIdentifierWriteable {
95
97
  self = .hkcategorytypeidentifierlowerbackpain
96
98
  case "HKCategoryTypeIdentifierMemoryLapse":
97
99
  self = .hkcategorytypeidentifiermemorylapse
100
+ case "HKCategoryTypeIdentifierMenopausalState":
101
+ self = .hkcategorytypeidentifiermenopausalstate
98
102
  case "HKCategoryTypeIdentifierMenstrualFlow":
99
103
  self = .hkcategorytypeidentifiermenstrualflow
100
104
  case "HKCategoryTypeIdentifierMindfulSession":
@@ -167,8 +171,6 @@ public extension SampleTypeIdentifierWriteable {
167
171
  self = .hkquantitytypeidentifierbloodalcoholcontent
168
172
  case "HKQuantityTypeIdentifierBloodGlucose":
169
173
  self = .hkquantitytypeidentifierbloodglucose
170
- case "HKQuantityTypeIdentifierBloodKetones":
171
- self = .hkquantitytypeidentifierbloodketones
172
174
  case "HKQuantityTypeIdentifierBloodPressureDiastolic":
173
175
  self = .hkquantitytypeidentifierbloodpressurediastolic
174
176
  case "HKQuantityTypeIdentifierBloodPressureSystolic":
@@ -307,6 +309,8 @@ public extension SampleTypeIdentifierWriteable {
307
309
  self = .hkquantitytypeidentifierheartrate
308
310
  case "HKQuantityTypeIdentifierHeartRateRecoveryOneMinute":
309
311
  self = .hkquantitytypeidentifierheartraterecoveryoneminute
312
+ case "HKQuantityTypeIdentifierHeartRateVariabilityRMSSD":
313
+ self = .hkquantitytypeidentifierheartratevariabilityrmssd
310
314
  case "HKQuantityTypeIdentifierHeartRateVariabilitySDNN":
311
315
  self = .hkquantitytypeidentifierheartratevariabilitysdnn
312
316
  case "HKQuantityTypeIdentifierHeight":
@@ -415,6 +419,8 @@ public extension SampleTypeIdentifierWriteable {
415
419
  return "HKCategoryTypeIdentifierAudioExposureEvent"
416
420
  case .hkcategorytypeidentifierbladderincontinence:
417
421
  return "HKCategoryTypeIdentifierBladderIncontinence"
422
+ case .hkcategorytypeidentifierbleedingaftermenopause:
423
+ return "HKCategoryTypeIdentifierBleedingAfterMenopause"
418
424
  case .hkcategorytypeidentifierbleedingafterpregnancy:
419
425
  return "HKCategoryTypeIdentifierBleedingAfterPregnancy"
420
426
  case .hkcategorytypeidentifierbleedingduringpregnancy:
@@ -481,6 +487,8 @@ public extension SampleTypeIdentifierWriteable {
481
487
  return "HKCategoryTypeIdentifierLowerBackPain"
482
488
  case .hkcategorytypeidentifiermemorylapse:
483
489
  return "HKCategoryTypeIdentifierMemoryLapse"
490
+ case .hkcategorytypeidentifiermenopausalstate:
491
+ return "HKCategoryTypeIdentifierMenopausalState"
484
492
  case .hkcategorytypeidentifiermenstrualflow:
485
493
  return "HKCategoryTypeIdentifierMenstrualFlow"
486
494
  case .hkcategorytypeidentifiermindfulsession:
@@ -553,8 +561,6 @@ public extension SampleTypeIdentifierWriteable {
553
561
  return "HKQuantityTypeIdentifierBloodAlcoholContent"
554
562
  case .hkquantitytypeidentifierbloodglucose:
555
563
  return "HKQuantityTypeIdentifierBloodGlucose"
556
- case .hkquantitytypeidentifierbloodketones:
557
- return "HKQuantityTypeIdentifierBloodKetones"
558
564
  case .hkquantitytypeidentifierbloodpressurediastolic:
559
565
  return "HKQuantityTypeIdentifierBloodPressureDiastolic"
560
566
  case .hkquantitytypeidentifierbloodpressuresystolic:
@@ -693,6 +699,8 @@ public extension SampleTypeIdentifierWriteable {
693
699
  return "HKQuantityTypeIdentifierHeartRate"
694
700
  case .hkquantitytypeidentifierheartraterecoveryoneminute:
695
701
  return "HKQuantityTypeIdentifierHeartRateRecoveryOneMinute"
702
+ case .hkquantitytypeidentifierheartratevariabilityrmssd:
703
+ return "HKQuantityTypeIdentifierHeartRateVariabilityRMSSD"
696
704
  case .hkquantitytypeidentifierheartratevariabilitysdnn:
697
705
  return "HKQuantityTypeIdentifierHeartRateVariabilitySDNN"
698
706
  case .hkquantitytypeidentifierheight:
@@ -18,11 +18,8 @@ public extension SourceRevision {
18
18
  /**
19
19
  * Create a new instance of `SourceRevision`.
20
20
  */
21
- init(source: (any HybridSourceProxySpec), version: String?, operatingSystemVersion: String, productType: String?) {
22
- self.init({ () -> bridge.std__shared_ptr_HybridSourceProxySpec_ in
23
- let __cxxWrapped = source.getCxxWrapper()
24
- return __cxxWrapped.getCxxPart()
25
- }(), { () -> bridge.std__optional_std__string_ in
21
+ init(source: Source, version: String?, operatingSystemVersion: String, productType: String?) {
22
+ self.init(source, { () -> bridge.std__optional_std__string_ in
26
23
  if let __unwrappedValue = version {
27
24
  return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
28
25
  } else {
@@ -38,12 +35,8 @@ public extension SourceRevision {
38
35
  }
39
36
 
40
37
  @inline(__always)
41
- var source: (any HybridSourceProxySpec) {
42
- return { () -> any HybridSourceProxySpec in
43
- let __unsafePointer = bridge.get_std__shared_ptr_HybridSourceProxySpec_(self.__source)
44
- let __instance = HybridSourceProxySpec_cxx.fromUnsafe(__unsafePointer)
45
- return __instance.getHybridSourceProxySpec()
46
- }()
38
+ var source: Source {
39
+ return self.__source
47
40
  }
48
41
 
49
42
  @inline(__always)
@@ -18,7 +18,7 @@ public extension StateOfMindSample {
18
18
  /**
19
19
  * Create a new instance of `StateOfMindSample`.
20
20
  */
21
- init(valence: Double, kind: StateOfMindKind, valenceClassification: StateOfMindValenceClassification, associations: [StateOfMindAssociation], labels: [StateOfMindLabel], sampleType: SampleType, startDate: Date, endDate: Date, hasUndeterminedDuration: Bool, metadata: AnyMap, uuid: String, sourceRevision: SourceRevision, device: Device?) {
21
+ init(valence: Double, kind: StateOfMindKind, valenceClassification: StateOfMindValenceClassification, associations: [StateOfMindAssociation], labels: [StateOfMindLabel], sampleType: SampleType, startDate: Date, endDate: Date, hasUndeterminedDuration: Bool, uuid: String, sourceRevision: SourceRevision, device: Device?, metadata: AnyMap) {
22
22
  self.init(valence, kind, valenceClassification, { () -> bridge.std__vector_StateOfMindAssociation_ in
23
23
  var __vector = bridge.create_std__vector_StateOfMindAssociation_(associations.count)
24
24
  for __item in associations {
@@ -31,13 +31,13 @@ public extension StateOfMindSample {
31
31
  __vector.push_back(__item)
32
32
  }
33
33
  return __vector
34
- }(), sampleType, startDate.toCpp(), endDate.toCpp(), hasUndeterminedDuration, metadata.cppPart, std.string(uuid), sourceRevision, { () -> bridge.std__optional_Device_ in
34
+ }(), sampleType, startDate.toCpp(), endDate.toCpp(), hasUndeterminedDuration, std.string(uuid), sourceRevision, { () -> bridge.std__optional_Device_ in
35
35
  if let __unwrappedValue = device {
36
36
  return bridge.create_std__optional_Device_(__unwrappedValue)
37
37
  } else {
38
38
  return .init()
39
39
  }
40
- }())
40
+ }(), metadata.cppPart)
41
41
  }
42
42
 
43
43
  @inline(__always)
@@ -85,11 +85,6 @@ public extension StateOfMindSample {
85
85
  return self.__hasUndeterminedDuration
86
86
  }
87
87
 
88
- @inline(__always)
89
- var metadata: AnyMap {
90
- return AnyMap(withCppPart: self.__metadata)
91
- }
92
-
93
88
  @inline(__always)
94
89
  var uuid: String {
95
90
  return String(self.__uuid)
@@ -104,4 +99,9 @@ public extension StateOfMindSample {
104
99
  var device: Device? {
105
100
  return self.__device.value
106
101
  }
102
+
103
+ @inline(__always)
104
+ var metadata: AnyMap {
105
+ return AnyMap(withCppPart: self.__metadata)
106
+ }
107
107
  }
@@ -183,6 +183,10 @@ public extension WorkoutActivityType {
183
183
  self = .transition
184
184
  case "underwaterDiving":
185
185
  self = .underwaterdiving
186
+ case "rest":
187
+ self = .rest
188
+ case "group":
189
+ self = .group
186
190
  case "other":
187
191
  self = .other
188
192
  default:
@@ -361,6 +365,10 @@ public extension WorkoutActivityType {
361
365
  return "transition"
362
366
  case .underwaterdiving:
363
367
  return "underwaterDiving"
368
+ case .rest:
369
+ return "rest"
370
+ case .group:
371
+ return "group"
364
372
  case .other:
365
373
  return "other"
366
374
  }
@@ -40,11 +40,11 @@ namespace margelo::nitro::healthkit { struct Device; }
40
40
  #include "CategoryTypeIdentifier.hpp"
41
41
  #include "SampleType.hpp"
42
42
  #include <chrono>
43
- #include <NitroModules/AnyMap.hpp>
44
43
  #include <string>
45
44
  #include "SourceRevision.hpp"
46
45
  #include "Device.hpp"
47
46
  #include <optional>
47
+ #include <NitroModules/AnyMap.hpp>
48
48
 
49
49
  namespace margelo::nitro::healthkit {
50
50
 
@@ -59,14 +59,14 @@ namespace margelo::nitro::healthkit {
59
59
  std::chrono::system_clock::time_point startDate SWIFT_PRIVATE;
60
60
  std::chrono::system_clock::time_point endDate SWIFT_PRIVATE;
61
61
  bool hasUndeterminedDuration SWIFT_PRIVATE;
62
- std::shared_ptr<AnyMap> metadata SWIFT_PRIVATE;
63
62
  std::string uuid SWIFT_PRIVATE;
64
63
  SourceRevision sourceRevision SWIFT_PRIVATE;
65
64
  std::optional<Device> device SWIFT_PRIVATE;
65
+ std::shared_ptr<AnyMap> metadata SWIFT_PRIVATE;
66
66
 
67
67
  public:
68
68
  CategorySample() = default;
69
- explicit CategorySample(CategoryTypeIdentifier categoryType, double value, SampleType sampleType, std::chrono::system_clock::time_point startDate, std::chrono::system_clock::time_point endDate, bool hasUndeterminedDuration, std::shared_ptr<AnyMap> metadata, std::string uuid, SourceRevision sourceRevision, std::optional<Device> device): categoryType(categoryType), value(value), sampleType(sampleType), startDate(startDate), endDate(endDate), hasUndeterminedDuration(hasUndeterminedDuration), metadata(metadata), uuid(uuid), sourceRevision(sourceRevision), device(device) {}
69
+ explicit CategorySample(CategoryTypeIdentifier categoryType, double value, SampleType sampleType, std::chrono::system_clock::time_point startDate, std::chrono::system_clock::time_point endDate, bool hasUndeterminedDuration, std::string uuid, SourceRevision sourceRevision, std::optional<Device> device, std::shared_ptr<AnyMap> metadata): categoryType(categoryType), value(value), sampleType(sampleType), startDate(startDate), endDate(endDate), hasUndeterminedDuration(hasUndeterminedDuration), uuid(uuid), sourceRevision(sourceRevision), device(device), metadata(metadata) {}
70
70
 
71
71
  public:
72
72
  friend bool operator==(const CategorySample& lhs, const CategorySample& rhs) = default;
@@ -88,10 +88,10 @@ namespace margelo::nitro {
88
88
  JSIConverter<std::chrono::system_clock::time_point>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "startDate"))),
89
89
  JSIConverter<std::chrono::system_clock::time_point>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "endDate"))),
90
90
  JSIConverter<bool>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "hasUndeterminedDuration"))),
91
- JSIConverter<std::shared_ptr<AnyMap>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "metadata"))),
92
91
  JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "uuid"))),
93
92
  JSIConverter<margelo::nitro::healthkit::SourceRevision>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "sourceRevision"))),
94
- JSIConverter<std::optional<margelo::nitro::healthkit::Device>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "device")))
93
+ JSIConverter<std::optional<margelo::nitro::healthkit::Device>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "device"))),
94
+ JSIConverter<std::shared_ptr<AnyMap>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "metadata")))
95
95
  );
96
96
  }
97
97
  static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::healthkit::CategorySample& arg) {
@@ -102,10 +102,10 @@ namespace margelo::nitro {
102
102
  obj.setProperty(runtime, PropNameIDCache::get(runtime, "startDate"), JSIConverter<std::chrono::system_clock::time_point>::toJSI(runtime, arg.startDate));
103
103
  obj.setProperty(runtime, PropNameIDCache::get(runtime, "endDate"), JSIConverter<std::chrono::system_clock::time_point>::toJSI(runtime, arg.endDate));
104
104
  obj.setProperty(runtime, PropNameIDCache::get(runtime, "hasUndeterminedDuration"), JSIConverter<bool>::toJSI(runtime, arg.hasUndeterminedDuration));
105
- obj.setProperty(runtime, PropNameIDCache::get(runtime, "metadata"), JSIConverter<std::shared_ptr<AnyMap>>::toJSI(runtime, arg.metadata));
106
105
  obj.setProperty(runtime, PropNameIDCache::get(runtime, "uuid"), JSIConverter<std::string>::toJSI(runtime, arg.uuid));
107
106
  obj.setProperty(runtime, PropNameIDCache::get(runtime, "sourceRevision"), JSIConverter<margelo::nitro::healthkit::SourceRevision>::toJSI(runtime, arg.sourceRevision));
108
107
  obj.setProperty(runtime, PropNameIDCache::get(runtime, "device"), JSIConverter<std::optional<margelo::nitro::healthkit::Device>>::toJSI(runtime, arg.device));
108
+ obj.setProperty(runtime, PropNameIDCache::get(runtime, "metadata"), JSIConverter<std::shared_ptr<AnyMap>>::toJSI(runtime, arg.metadata));
109
109
  return obj;
110
110
  }
111
111
  static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
@@ -122,10 +122,10 @@ namespace margelo::nitro {
122
122
  if (!JSIConverter<std::chrono::system_clock::time_point>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "startDate")))) return false;
123
123
  if (!JSIConverter<std::chrono::system_clock::time_point>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "endDate")))) return false;
124
124
  if (!JSIConverter<bool>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "hasUndeterminedDuration")))) return false;
125
- if (!JSIConverter<std::shared_ptr<AnyMap>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "metadata")))) return false;
126
125
  if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "uuid")))) return false;
127
126
  if (!JSIConverter<margelo::nitro::healthkit::SourceRevision>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "sourceRevision")))) return false;
128
127
  if (!JSIConverter<std::optional<margelo::nitro::healthkit::Device>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "device")))) return false;
128
+ if (!JSIConverter<std::shared_ptr<AnyMap>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "metadata")))) return false;
129
129
  return true;
130
130
  }
131
131
  };