@kingstinct/react-native-healthkit 13.3.1 → 14.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 (191) hide show
  1. package/ReactNativeHealthkit.podspec +1 -0
  2. package/app.plugin.ts +40 -2
  3. package/ios/BackgroundDeliveryManager.swift +196 -0
  4. package/ios/CategoryTypeModule.swift +1 -1
  5. package/ios/CoreModule.swift +24 -0
  6. package/ios/CorrelationTypeModule.swift +2 -35
  7. package/ios/ElectrocardiogramModule.swift +2 -34
  8. package/ios/HeartbeatSeriesModule.swift +2 -34
  9. package/ios/MedicationModule.swift +3 -35
  10. package/ios/PredicateHelpers.swift +2 -2
  11. package/ios/QuantityTypeModule.swift +11 -11
  12. package/ios/Serializers.swift +58 -90
  13. package/ios/StateOfMindModule.swift +2 -34
  14. package/ios/WorkoutProxy.swift +4 -149
  15. package/ios/generated/HealthkitGenerated.swift +52 -0
  16. package/lib/commonjs/generated/healthkit.generated.js +745 -0
  17. package/lib/commonjs/healthkit.ios.js +51 -17
  18. package/lib/commonjs/healthkit.js +120 -34
  19. package/lib/commonjs/specs/QuantityTypeModule.nitro.js +1 -0
  20. package/lib/commonjs/type-tests/generated-typing.js +2 -0
  21. package/lib/commonjs/types/CategoryType.js +19 -99
  22. package/lib/commonjs/types/Medication.js +2 -0
  23. package/lib/commonjs/types/MetadataEnums.js +17 -0
  24. package/lib/commonjs/types/QuantityType.js +4 -15
  25. package/lib/commonjs/types/WeatherCondition.js +2 -32
  26. package/lib/commonjs/types/Workouts.js +3 -98
  27. package/lib/commonjs/types/index.js +2 -0
  28. package/lib/module/generated/healthkit.generated.js +742 -0
  29. package/lib/module/healthkit.ios.js +49 -15
  30. package/lib/module/healthkit.js +94 -20
  31. package/lib/module/specs/QuantityTypeModule.nitro.js +1 -0
  32. package/lib/module/type-tests/generated-typing.js +1 -0
  33. package/lib/module/types/CategoryType.js +2 -98
  34. package/lib/module/types/Medication.js +1 -0
  35. package/lib/module/types/MetadataEnums.js +1 -0
  36. package/lib/module/types/QuantityType.js +2 -14
  37. package/lib/module/types/WeatherCondition.js +1 -32
  38. package/lib/module/types/Workouts.js +2 -98
  39. package/lib/module/types/index.js +2 -0
  40. package/lib/typescript/generated/healthkit.generated.d.ts +1006 -0
  41. package/lib/typescript/healthkit.d.ts +39 -36
  42. package/lib/typescript/healthkit.ios.d.ts +64 -53
  43. package/lib/typescript/hooks/useMostRecentQuantitySample.d.ts +3 -2
  44. package/lib/typescript/hooks/useMostRecentWorkout.d.ts +2 -2
  45. package/lib/typescript/hooks/useQuantitySampleById.d.ts +5 -4
  46. package/lib/typescript/hooks/useStatisticsForQuantity.d.ts +2 -2
  47. package/lib/typescript/hooks/useSubscribeToQuantitySamples.d.ts +1 -1
  48. package/lib/typescript/modules.d.ts +2 -2
  49. package/lib/typescript/specs/CategoryTypeModule.nitro.d.ts +3 -3
  50. package/lib/typescript/specs/CoreModule.nitro.d.ts +15 -0
  51. package/lib/typescript/specs/QuantityTypeModule.nitro.d.ts +20 -9
  52. package/lib/typescript/type-tests/generated-typing.d.ts +1 -0
  53. package/lib/typescript/types/CategoryType.d.ts +10 -104
  54. package/lib/typescript/types/CategoryTypeIdentifier.d.ts +1 -61
  55. package/lib/typescript/types/CorrelationType.d.ts +8 -2
  56. package/lib/typescript/types/ElectrocardiogramSample.d.ts +8 -1
  57. package/lib/typescript/types/HeartbeatSeries.d.ts +8 -1
  58. package/lib/typescript/types/InterfaceVerification.d.ts +14 -1
  59. package/lib/typescript/types/Medication.d.ts +10 -0
  60. package/lib/typescript/types/MetadataEnums.d.ts +1 -0
  61. package/lib/typescript/types/QuantitySample.d.ts +9 -1
  62. package/lib/typescript/types/QuantityType.d.ts +14 -18
  63. package/lib/typescript/types/QuantityTypeIdentifier.d.ts +1 -671
  64. package/lib/typescript/types/QueryOptions.d.ts +8 -4
  65. package/lib/typescript/types/Shared.d.ts +12 -41
  66. package/lib/typescript/types/StateOfMind.d.ts +8 -1
  67. package/lib/typescript/types/Subscriptions.d.ts +11 -11
  68. package/lib/typescript/types/WeatherCondition.d.ts +1 -30
  69. package/lib/typescript/types/Workouts.d.ts +20 -104
  70. package/lib/typescript/types/index.d.ts +2 -0
  71. package/lib/typescript/utils/getMostRecentQuantitySample.d.ts +2 -1
  72. package/lib/typescript/utils/getMostRecentWorkout.d.ts +2 -1
  73. package/lib/typescript/utils/getPreferredUnit.d.ts +2 -1
  74. package/lib/typescript/utils/getQuantitySampleById.d.ts +2 -1
  75. package/lib/typescript/utils/subscribeToQuantitySamples.d.ts +1 -1
  76. package/nitrogen/generated/ios/ReactNativeHealthkit-Swift-Cxx-Bridge.hpp +55 -109
  77. package/nitrogen/generated/ios/ReactNativeHealthkit-Swift-Cxx-Umbrella.hpp +12 -18
  78. package/nitrogen/generated/ios/c++/HybridCategoryTypeModuleSpecSwift.hpp +5 -14
  79. package/nitrogen/generated/ios/c++/HybridCoreModuleSpecSwift.hpp +18 -2
  80. package/nitrogen/generated/ios/c++/HybridCorrelationTypeModuleSpecSwift.hpp +1 -13
  81. package/nitrogen/generated/ios/c++/HybridElectrocardiogramModuleSpecSwift.hpp +1 -13
  82. package/nitrogen/generated/ios/c++/HybridHeartbeatSeriesModuleSpecSwift.hpp +2 -14
  83. package/nitrogen/generated/ios/c++/HybridMedicationModuleSpecSwift.hpp +1 -13
  84. package/nitrogen/generated/ios/c++/HybridQuantityTypeModuleSpecSwift.hpp +19 -28
  85. package/nitrogen/generated/ios/c++/HybridStateOfMindModuleSpecSwift.hpp +2 -14
  86. package/nitrogen/generated/ios/c++/HybridWorkoutProxySpecSwift.hpp +3 -116
  87. package/nitrogen/generated/ios/swift/CategorySample.swift +4 -329
  88. package/nitrogen/generated/ios/swift/CategoryTypeIdentifier.swift +112 -108
  89. package/nitrogen/generated/ios/swift/CategoryTypeIdentifierWriteable.swift +292 -0
  90. package/nitrogen/generated/ios/swift/CorrelationSample.swift +4 -347
  91. package/nitrogen/generated/ios/swift/ElectrocardiogramSample.swift +4 -329
  92. package/nitrogen/generated/ios/swift/FilterForWorkouts.swift +30 -30
  93. package/nitrogen/generated/ios/swift/FilterForWorkoutsBase.swift +30 -30
  94. package/nitrogen/generated/ios/swift/GeneralForm.swift +4 -4
  95. package/nitrogen/generated/ios/swift/HeartbeatSeriesSample.swift +4 -329
  96. package/nitrogen/generated/ios/swift/HybridCategoryTypeModuleSpec.swift +1 -1
  97. package/nitrogen/generated/ios/swift/HybridCategoryTypeModuleSpec_cxx.swift +1 -1
  98. package/nitrogen/generated/ios/swift/HybridCoreModuleSpec.swift +2 -0
  99. package/nitrogen/generated/ios/swift/HybridCoreModuleSpec_cxx.swift +38 -0
  100. package/nitrogen/generated/ios/swift/HybridQuantityTypeModuleSpec.swift +6 -6
  101. package/nitrogen/generated/ios/swift/HybridQuantityTypeModuleSpec_cxx.swift +6 -6
  102. package/nitrogen/generated/ios/swift/HybridWorkoutProxySpec.swift +1 -27
  103. package/nitrogen/generated/ios/swift/HybridWorkoutProxySpec_cxx.swift +2 -340
  104. package/nitrogen/generated/ios/swift/MedicationDoseEvent.swift +4 -329
  105. package/nitrogen/generated/ios/swift/ObjectTypeIdentifier.swift +492 -492
  106. package/nitrogen/generated/ios/swift/QuantitySample.swift +4 -329
  107. package/nitrogen/generated/ios/swift/QuantityTypeIdentifier.swift +380 -384
  108. package/nitrogen/generated/ios/swift/QuantityTypeIdentifierWriteable.swift +372 -376
  109. package/nitrogen/generated/ios/swift/{QueryOptionsWithAnchorAndUnit.swift → QueryOptionsWithAnchorAndStringUnit.swift} +5 -5
  110. package/nitrogen/generated/ios/swift/{QueryOptionsWithSortOrderAndUnit.swift → QueryOptionsWithSortOrderAndStringUnit.swift} +5 -5
  111. package/nitrogen/generated/ios/swift/QueryStatisticsResponseFromSingleSource.swift +37 -37
  112. package/nitrogen/generated/ios/swift/SampleTypeIdentifier.swift +492 -492
  113. package/nitrogen/generated/ios/swift/SampleTypeIdentifierWriteable.swift +482 -486
  114. package/nitrogen/generated/ios/swift/StateOfMindSample.swift +4 -329
  115. package/nitrogen/generated/ios/swift/{StatisticsQueryOptions.swift → StatisticsQueryOptionsWithStringUnit.swift} +5 -5
  116. package/nitrogen/generated/ios/swift/WorkoutEvent.swift +20 -2
  117. package/nitrogen/generated/ios/swift/WorkoutSample.swift +4 -402
  118. package/nitrogen/generated/shared/c++/CategorySample.hpp +8 -100
  119. package/nitrogen/generated/shared/c++/CategoryTypeIdentifier.hpp +153 -149
  120. package/nitrogen/generated/shared/c++/CategoryTypeIdentifierWriteable.hpp +328 -0
  121. package/nitrogen/generated/shared/c++/CorrelationSample.hpp +9 -105
  122. package/nitrogen/generated/shared/c++/ElectrocardiogramSample.hpp +7 -99
  123. package/nitrogen/generated/shared/c++/FilterForWorkouts.hpp +13 -13
  124. package/nitrogen/generated/shared/c++/FilterForWorkoutsBase.hpp +13 -13
  125. package/nitrogen/generated/shared/c++/GeneralForm.hpp +7 -7
  126. package/nitrogen/generated/shared/c++/HeartbeatSeriesSample.hpp +8 -100
  127. package/nitrogen/generated/shared/c++/HybridCategoryTypeModuleSpec.hpp +5 -2
  128. package/nitrogen/generated/shared/c++/HybridCoreModuleSpec.cpp +2 -0
  129. package/nitrogen/generated/shared/c++/HybridCoreModuleSpec.hpp +4 -2
  130. package/nitrogen/generated/shared/c++/HybridQuantityTypeModuleSpec.hpp +15 -15
  131. package/nitrogen/generated/shared/c++/HybridWorkoutProxySpec.cpp +1 -27
  132. package/nitrogen/generated/shared/c++/HybridWorkoutProxySpec.hpp +2 -37
  133. package/nitrogen/generated/shared/c++/MedicationDoseEvent.hpp +7 -99
  134. package/nitrogen/generated/shared/c++/ObjectTypeIdentifier.hpp +565 -565
  135. package/nitrogen/generated/shared/c++/QuantitySample.hpp +8 -100
  136. package/nitrogen/generated/shared/c++/QuantityTypeIdentifier.hpp +407 -411
  137. package/nitrogen/generated/shared/c++/QuantityTypeIdentifierWriteable.hpp +398 -402
  138. package/nitrogen/generated/shared/c++/{QueryOptionsWithAnchorAndUnit.hpp → QueryOptionsWithAnchorAndStringUnit.hpp} +11 -11
  139. package/nitrogen/generated/shared/c++/{QueryOptionsWithSortOrderAndUnit.hpp → QueryOptionsWithSortOrderAndStringUnit.hpp} +11 -11
  140. package/nitrogen/generated/shared/c++/QueryStatisticsResponseFromSingleSource.hpp +12 -12
  141. package/nitrogen/generated/shared/c++/SampleTypeIdentifier.hpp +559 -559
  142. package/nitrogen/generated/shared/c++/SampleTypeIdentifierWriteable.hpp +541 -545
  143. package/nitrogen/generated/shared/c++/StateOfMindSample.hpp +8 -100
  144. package/nitrogen/generated/shared/c++/{StatisticsQueryOptions.hpp → StatisticsQueryOptionsWithStringUnit.hpp} +11 -11
  145. package/nitrogen/generated/shared/c++/WorkoutEvent.hpp +8 -2
  146. package/nitrogen/generated/shared/c++/WorkoutSample.hpp +7 -120
  147. package/package.json +5 -2
  148. package/src/generated/healthkit-schema.json +3680 -0
  149. package/src/generated/healthkit.generated.ts +1307 -0
  150. package/src/healthkit.ios.ts +225 -19
  151. package/src/healthkit.ts +181 -55
  152. package/src/hooks/useMostRecentQuantitySample.ts +6 -5
  153. package/src/hooks/useMostRecentWorkout.ts +2 -2
  154. package/src/hooks/useQuantitySampleById.ts +6 -5
  155. package/src/hooks/useStatisticsForQuantity.ts +2 -1
  156. package/src/hooks/useSubscribeToQuantitySamples.ts +1 -1
  157. package/src/modules.ts +7 -2
  158. package/src/specs/CategoryTypeModule.nitro.ts +8 -5
  159. package/src/specs/CoreModule.nitro.ts +20 -0
  160. package/src/specs/QuantityTypeModule.nitro.ts +81 -7
  161. package/src/test-setup.ts +2 -0
  162. package/src/type-tests/generated-typing.ts +133 -0
  163. package/src/types/CategoryType.ts +52 -148
  164. package/src/types/CategoryTypeIdentifier.ts +5 -134
  165. package/src/types/CorrelationType.ts +13 -3
  166. package/src/types/ElectrocardiogramSample.ts +13 -1
  167. package/src/types/HeartbeatSeries.ts +13 -1
  168. package/src/types/InterfaceVerification.ts +38 -1
  169. package/src/types/Medication.ts +19 -0
  170. package/src/types/MetadataEnums.ts +15 -0
  171. package/src/types/QuantitySample.ts +14 -2
  172. package/src/types/QuantityType.ts +22 -122
  173. package/src/types/QuantityTypeIdentifier.ts +5 -772
  174. package/src/types/QueryOptions.ts +11 -4
  175. package/src/types/Shared.ts +22 -49
  176. package/src/types/StateOfMind.ts +13 -1
  177. package/src/types/Subscriptions.ts +19 -13
  178. package/src/types/WeatherCondition.ts +1 -31
  179. package/src/types/Workouts.ts +46 -108
  180. package/src/types/index.ts +2 -0
  181. package/src/utils/getMostRecentQuantitySample.ts +4 -3
  182. package/src/utils/getMostRecentWorkout.ts +5 -2
  183. package/src/utils/getPreferredUnit.ts +5 -4
  184. package/src/utils/getQuantitySampleById.ts +4 -3
  185. package/src/utils/subscribeToQuantitySamples.ts +5 -3
  186. package/nitrogen/generated/ios/swift/HeartRateMotionContext.swift +0 -44
  187. package/nitrogen/generated/ios/swift/InsulinDeliveryReason.swift +0 -40
  188. package/nitrogen/generated/ios/swift/WeatherCondition.swift +0 -144
  189. package/nitrogen/generated/shared/c++/HeartRateMotionContext.hpp +0 -67
  190. package/nitrogen/generated/shared/c++/InsulinDeliveryReason.hpp +0 -62
  191. package/nitrogen/generated/shared/c++/WeatherCondition.hpp +0 -88
@@ -26,6 +26,8 @@ namespace margelo::nitro::healthkit { struct CategorySampleForSaving; }
26
26
  namespace margelo::nitro::healthkit { struct CategorySample; }
27
27
  // Forward declaration of `CategorySamplesWithAnchorResponse` to properly resolve imports.
28
28
  namespace margelo::nitro::healthkit { struct CategorySamplesWithAnchorResponse; }
29
+ // Forward declaration of `CategoryTypeIdentifierWriteable` to properly resolve imports.
30
+ namespace margelo::nitro::healthkit { enum class CategoryTypeIdentifierWriteable; }
29
31
  // Forward declaration of `CategoryTypeIdentifier` to properly resolve imports.
30
32
  namespace margelo::nitro::healthkit { enum class CategoryTypeIdentifier; }
31
33
  // Forward declaration of `ComparisonPredicateOperator` to properly resolve imports.
@@ -68,8 +70,6 @@ namespace margelo::nitro::healthkit { struct FilterForWorkouts; }
68
70
  namespace margelo::nitro::healthkit { enum class FitzpatrickSkinType; }
69
71
  // Forward declaration of `GeneralForm` to properly resolve imports.
70
72
  namespace margelo::nitro::healthkit { enum class GeneralForm; }
71
- // Forward declaration of `HeartRateMotionContext` to properly resolve imports.
72
- namespace margelo::nitro::healthkit { enum class HeartRateMotionContext; }
73
73
  // Forward declaration of `HeartbeatSeriesSample` to properly resolve imports.
74
74
  namespace margelo::nitro::healthkit { struct HeartbeatSeriesSample; }
75
75
  // Forward declaration of `HeartbeatSeriesSamplesWithAnchorResponse` to properly resolve imports.
@@ -102,8 +102,6 @@ namespace margelo::nitro::healthkit { class HybridWorkoutProxySpec; }
102
102
  namespace margelo::nitro::healthkit { class HybridWorkoutsModuleSpec; }
103
103
  // Forward declaration of `IdentifierWithUnit` to properly resolve imports.
104
104
  namespace margelo::nitro::healthkit { struct IdentifierWithUnit; }
105
- // Forward declaration of `InsulinDeliveryReason` to properly resolve imports.
106
- namespace margelo::nitro::healthkit { enum class InsulinDeliveryReason; }
107
105
  // Forward declaration of `IntervalComponents` to properly resolve imports.
108
106
  namespace margelo::nitro::healthkit { struct IntervalComponents; }
109
107
  // Forward declaration of `LocationForSaving` to properly resolve imports.
@@ -142,12 +140,12 @@ namespace margelo::nitro::healthkit { enum class QuantityTypeIdentifier; }
142
140
  namespace margelo::nitro::healthkit { struct Quantity; }
143
141
  // Forward declaration of `QueryCorrelationSamplesWithAnchorResponse` to properly resolve imports.
144
142
  namespace margelo::nitro::healthkit { struct QueryCorrelationSamplesWithAnchorResponse; }
145
- // Forward declaration of `QueryOptionsWithAnchorAndUnit` to properly resolve imports.
146
- namespace margelo::nitro::healthkit { struct QueryOptionsWithAnchorAndUnit; }
143
+ // Forward declaration of `QueryOptionsWithAnchorAndStringUnit` to properly resolve imports.
144
+ namespace margelo::nitro::healthkit { struct QueryOptionsWithAnchorAndStringUnit; }
147
145
  // Forward declaration of `QueryOptionsWithAnchor` to properly resolve imports.
148
146
  namespace margelo::nitro::healthkit { struct QueryOptionsWithAnchor; }
149
- // Forward declaration of `QueryOptionsWithSortOrderAndUnit` to properly resolve imports.
150
- namespace margelo::nitro::healthkit { struct QueryOptionsWithSortOrderAndUnit; }
147
+ // Forward declaration of `QueryOptionsWithSortOrderAndStringUnit` to properly resolve imports.
148
+ namespace margelo::nitro::healthkit { struct QueryOptionsWithSortOrderAndStringUnit; }
151
149
  // Forward declaration of `QueryOptionsWithSortOrder` to properly resolve imports.
152
150
  namespace margelo::nitro::healthkit { struct QueryOptionsWithSortOrder; }
153
151
  // Forward declaration of `QueryStatisticsResponseFromSingleSource` to properly resolve imports.
@@ -182,14 +180,12 @@ namespace margelo::nitro::healthkit { struct StateOfMindSamplesWithAnchorRespons
182
180
  namespace margelo::nitro::healthkit { enum class StateOfMindValenceClassification; }
183
181
  // Forward declaration of `StatisticsOptions` to properly resolve imports.
184
182
  namespace margelo::nitro::healthkit { enum class StatisticsOptions; }
185
- // Forward declaration of `StatisticsQueryOptions` to properly resolve imports.
186
- namespace margelo::nitro::healthkit { struct StatisticsQueryOptions; }
183
+ // Forward declaration of `StatisticsQueryOptionsWithStringUnit` to properly resolve imports.
184
+ namespace margelo::nitro::healthkit { struct StatisticsQueryOptionsWithStringUnit; }
187
185
  // Forward declaration of `UpdateFrequency` to properly resolve imports.
188
186
  namespace margelo::nitro::healthkit { enum class UpdateFrequency; }
189
187
  // Forward declaration of `UserAnnotatedMedication` to properly resolve imports.
190
188
  namespace margelo::nitro::healthkit { struct UserAnnotatedMedication; }
191
- // Forward declaration of `WeatherCondition` to properly resolve imports.
192
- namespace margelo::nitro::healthkit { enum class WeatherCondition; }
193
189
  // Forward declaration of `WheelchairUse` to properly resolve imports.
194
190
  namespace margelo::nitro::healthkit { enum class WheelchairUse; }
195
191
  // Forward declaration of `WorkoutActivityType` to properly resolve imports.
@@ -232,6 +228,7 @@ namespace margelo::nitro::healthkit { struct WorkoutTotals; }
232
228
  #include "CategorySampleForSaving.hpp"
233
229
  #include "CategorySamplesWithAnchorResponse.hpp"
234
230
  #include "CategoryTypeIdentifier.hpp"
231
+ #include "CategoryTypeIdentifierWriteable.hpp"
235
232
  #include "ComparisonPredicateOperator.hpp"
236
233
  #include "CorrelationSample.hpp"
237
234
  #include "CorrelationTypeIdentifier.hpp"
@@ -252,7 +249,6 @@ namespace margelo::nitro::healthkit { struct WorkoutTotals; }
252
249
  #include "FilterForWorkoutsBase.hpp"
253
250
  #include "FitzpatrickSkinType.hpp"
254
251
  #include "GeneralForm.hpp"
255
- #include "HeartRateMotionContext.hpp"
256
252
  #include "Heartbeat.hpp"
257
253
  #include "HeartbeatSeriesSample.hpp"
258
254
  #include "HeartbeatSeriesSamplesWithAnchorResponse.hpp"
@@ -269,7 +265,6 @@ namespace margelo::nitro::healthkit { struct WorkoutTotals; }
269
265
  #include "HybridWorkoutProxySpec.hpp"
270
266
  #include "HybridWorkoutsModuleSpec.hpp"
271
267
  #include "IdentifierWithUnit.hpp"
272
- #include "InsulinDeliveryReason.hpp"
273
268
  #include "IntervalComponents.hpp"
274
269
  #include "LocationForSaving.hpp"
275
270
  #include "MedicationConcept.hpp"
@@ -290,9 +285,9 @@ namespace margelo::nitro::healthkit { struct WorkoutTotals; }
290
285
  #include "QuantityTypeIdentifierWriteable.hpp"
291
286
  #include "QueryCorrelationSamplesWithAnchorResponse.hpp"
292
287
  #include "QueryOptionsWithAnchor.hpp"
293
- #include "QueryOptionsWithAnchorAndUnit.hpp"
288
+ #include "QueryOptionsWithAnchorAndStringUnit.hpp"
294
289
  #include "QueryOptionsWithSortOrder.hpp"
295
- #include "QueryOptionsWithSortOrderAndUnit.hpp"
290
+ #include "QueryOptionsWithSortOrderAndStringUnit.hpp"
296
291
  #include "QueryStatisticsResponse.hpp"
297
292
  #include "QueryStatisticsResponseFromSingleSource.hpp"
298
293
  #include "QueryWorkoutSamplesWithAnchorResponse.hpp"
@@ -309,10 +304,9 @@ namespace margelo::nitro::healthkit { struct WorkoutTotals; }
309
304
  #include "StateOfMindSamplesWithAnchorResponse.hpp"
310
305
  #include "StateOfMindValenceClassification.hpp"
311
306
  #include "StatisticsOptions.hpp"
312
- #include "StatisticsQueryOptions.hpp"
307
+ #include "StatisticsQueryOptionsWithStringUnit.hpp"
313
308
  #include "UpdateFrequency.hpp"
314
309
  #include "UserAnnotatedMedication.hpp"
315
- #include "WeatherCondition.hpp"
316
310
  #include "WheelchairUse.hpp"
317
311
  #include "WorkoutActivity.hpp"
318
312
  #include "WorkoutActivityType.hpp"
@@ -18,20 +18,14 @@ namespace margelo::nitro::healthkit { struct CategorySample; }
18
18
  namespace margelo::nitro::healthkit { enum class CategoryTypeIdentifier; }
19
19
  // Forward declaration of `SampleType` to properly resolve imports.
20
20
  namespace margelo::nitro::healthkit { struct SampleType; }
21
- // Forward declaration of `WeatherCondition` to properly resolve imports.
22
- namespace margelo::nitro::healthkit { enum class WeatherCondition; }
23
- // Forward declaration of `Quantity` to properly resolve imports.
24
- namespace margelo::nitro::healthkit { struct Quantity; }
25
- // Forward declaration of `InsulinDeliveryReason` to properly resolve imports.
26
- namespace margelo::nitro::healthkit { enum class InsulinDeliveryReason; }
27
- // Forward declaration of `HeartRateMotionContext` to properly resolve imports.
28
- namespace margelo::nitro::healthkit { enum class HeartRateMotionContext; }
29
21
  // Forward declaration of `SourceRevision` to properly resolve imports.
30
22
  namespace margelo::nitro::healthkit { struct SourceRevision; }
31
23
  // Forward declaration of `HybridSourceProxySpec` to properly resolve imports.
32
24
  namespace margelo::nitro::healthkit { class HybridSourceProxySpec; }
33
25
  // Forward declaration of `Device` to properly resolve imports.
34
26
  namespace margelo::nitro::healthkit { struct Device; }
27
+ // Forward declaration of `CategoryTypeIdentifierWriteable` to properly resolve imports.
28
+ namespace margelo::nitro::healthkit { enum class CategoryTypeIdentifierWriteable; }
35
29
  // Forward declaration of `QueryOptionsWithSortOrder` to properly resolve imports.
36
30
  namespace margelo::nitro::healthkit { struct QueryOptionsWithSortOrder; }
37
31
  // Forward declaration of `FilterForSamples` to properly resolve imports.
@@ -60,15 +54,12 @@ namespace margelo::nitro::healthkit { struct QueryOptionsWithAnchor; }
60
54
  #include "SampleType.hpp"
61
55
  #include <string>
62
56
  #include <chrono>
63
- #include "WeatherCondition.hpp"
64
- #include "Quantity.hpp"
65
- #include "InsulinDeliveryReason.hpp"
66
- #include "HeartRateMotionContext.hpp"
57
+ #include <NitroModules/AnyMap.hpp>
67
58
  #include "SourceRevision.hpp"
68
59
  #include <memory>
69
60
  #include "HybridSourceProxySpec.hpp"
70
61
  #include "Device.hpp"
71
- #include <NitroModules/AnyMap.hpp>
62
+ #include "CategoryTypeIdentifierWriteable.hpp"
72
63
  #include <vector>
73
64
  #include "QueryOptionsWithSortOrder.hpp"
74
65
  #include "FilterForSamples.hpp"
@@ -132,7 +123,7 @@ namespace margelo::nitro::healthkit {
132
123
 
133
124
  public:
134
125
  // Methods
135
- inline std::shared_ptr<Promise<std::optional<CategorySample>>> saveCategorySample(CategoryTypeIdentifier identifier, double value, std::chrono::system_clock::time_point startDate, std::chrono::system_clock::time_point endDate, const std::optional<std::shared_ptr<AnyMap>>& metadata) override {
126
+ inline std::shared_ptr<Promise<std::optional<CategorySample>>> saveCategorySample(CategoryTypeIdentifierWriteable identifier, double value, std::chrono::system_clock::time_point startDate, std::chrono::system_clock::time_point endDate, const std::optional<std::shared_ptr<AnyMap>>& metadata) override {
136
127
  auto __result = _swiftPart.saveCategorySample(static_cast<int>(identifier), std::forward<decltype(value)>(value), startDate, endDate, metadata);
137
128
  if (__result.hasError()) [[unlikely]] {
138
129
  std::rethrow_exception(__result.error());
@@ -52,11 +52,11 @@ namespace margelo::nitro::healthkit { enum class PerObjectTypeIdentifier; }
52
52
  #include <NitroModules/Promise.hpp>
53
53
  #include "ObjectTypeIdentifier.hpp"
54
54
  #include "UpdateFrequency.hpp"
55
+ #include <string>
56
+ #include <vector>
55
57
  #include <memory>
56
58
  #include "HybridSourceProxySpec.hpp"
57
59
  #include "IdentifierWithUnit.hpp"
58
- #include <vector>
59
- #include <string>
60
60
  #include "QuantityTypeIdentifier.hpp"
61
61
  #include <optional>
62
62
  #include "SampleTypeIdentifier.hpp"
@@ -151,6 +151,22 @@ namespace margelo::nitro::healthkit {
151
151
  auto __value = std::move(__result.value());
152
152
  return __value;
153
153
  }
154
+ inline std::shared_ptr<Promise<bool>> configureBackgroundTypes(const std::vector<std::string>& typeIdentifiers, UpdateFrequency updateFrequency) override {
155
+ auto __result = _swiftPart.configureBackgroundTypes(typeIdentifiers, static_cast<int>(updateFrequency));
156
+ if (__result.hasError()) [[unlikely]] {
157
+ std::rethrow_exception(__result.error());
158
+ }
159
+ auto __value = std::move(__result.value());
160
+ return __value;
161
+ }
162
+ inline std::shared_ptr<Promise<bool>> clearBackgroundTypes() override {
163
+ auto __result = _swiftPart.clearBackgroundTypes();
164
+ if (__result.hasError()) [[unlikely]] {
165
+ std::rethrow_exception(__result.error());
166
+ }
167
+ auto __value = std::move(__result.value());
168
+ return __value;
169
+ }
154
170
  inline bool isHealthDataAvailable() override {
155
171
  auto __result = _swiftPart.isHealthDataAvailable();
156
172
  if (__result.hasError()) [[unlikely]] {
@@ -24,14 +24,6 @@ namespace margelo::nitro::healthkit { struct QuantitySample; }
24
24
  namespace margelo::nitro::healthkit { enum class CategoryTypeIdentifier; }
25
25
  // Forward declaration of `SampleType` to properly resolve imports.
26
26
  namespace margelo::nitro::healthkit { struct SampleType; }
27
- // Forward declaration of `WeatherCondition` to properly resolve imports.
28
- namespace margelo::nitro::healthkit { enum class WeatherCondition; }
29
- // Forward declaration of `Quantity` to properly resolve imports.
30
- namespace margelo::nitro::healthkit { struct Quantity; }
31
- // Forward declaration of `InsulinDeliveryReason` to properly resolve imports.
32
- namespace margelo::nitro::healthkit { enum class InsulinDeliveryReason; }
33
- // Forward declaration of `HeartRateMotionContext` to properly resolve imports.
34
- namespace margelo::nitro::healthkit { enum class HeartRateMotionContext; }
35
27
  // Forward declaration of `SourceRevision` to properly resolve imports.
36
28
  namespace margelo::nitro::healthkit { struct SourceRevision; }
37
29
  // Forward declaration of `HybridSourceProxySpec` to properly resolve imports.
@@ -77,15 +69,11 @@ namespace margelo::nitro::healthkit { struct QueryOptionsWithAnchor; }
77
69
  #include "SampleType.hpp"
78
70
  #include <string>
79
71
  #include <chrono>
80
- #include "WeatherCondition.hpp"
81
- #include "Quantity.hpp"
82
- #include "InsulinDeliveryReason.hpp"
83
- #include "HeartRateMotionContext.hpp"
72
+ #include <NitroModules/AnyMap.hpp>
84
73
  #include "SourceRevision.hpp"
85
74
  #include <memory>
86
75
  #include "HybridSourceProxySpec.hpp"
87
76
  #include "Device.hpp"
88
- #include <NitroModules/AnyMap.hpp>
89
77
  #include "QuantityTypeIdentifier.hpp"
90
78
  #include "CategorySampleForSaving.hpp"
91
79
  #include "QuantitySampleForSaving.hpp"
@@ -24,14 +24,6 @@ namespace margelo::nitro::healthkit { struct ElectrocardiogramVoltage; }
24
24
  namespace margelo::nitro::healthkit { enum class ElectrocardiogramLead; }
25
25
  // Forward declaration of `SampleType` to properly resolve imports.
26
26
  namespace margelo::nitro::healthkit { struct SampleType; }
27
- // Forward declaration of `WeatherCondition` to properly resolve imports.
28
- namespace margelo::nitro::healthkit { enum class WeatherCondition; }
29
- // Forward declaration of `Quantity` to properly resolve imports.
30
- namespace margelo::nitro::healthkit { struct Quantity; }
31
- // Forward declaration of `InsulinDeliveryReason` to properly resolve imports.
32
- namespace margelo::nitro::healthkit { enum class InsulinDeliveryReason; }
33
- // Forward declaration of `HeartRateMotionContext` to properly resolve imports.
34
- namespace margelo::nitro::healthkit { enum class HeartRateMotionContext; }
35
27
  // Forward declaration of `SourceRevision` to properly resolve imports.
36
28
  namespace margelo::nitro::healthkit { struct SourceRevision; }
37
29
  // Forward declaration of `HybridSourceProxySpec` to properly resolve imports.
@@ -70,15 +62,11 @@ namespace margelo::nitro::healthkit { struct ECGQueryOptionsWithAnchor; }
70
62
  #include "SampleType.hpp"
71
63
  #include <string>
72
64
  #include <chrono>
73
- #include "WeatherCondition.hpp"
74
- #include "Quantity.hpp"
75
- #include "InsulinDeliveryReason.hpp"
76
- #include "HeartRateMotionContext.hpp"
65
+ #include <NitroModules/AnyMap.hpp>
77
66
  #include "SourceRevision.hpp"
78
67
  #include <memory>
79
68
  #include "HybridSourceProxySpec.hpp"
80
69
  #include "Device.hpp"
81
- #include <NitroModules/AnyMap.hpp>
82
70
  #include "ECGQueryOptionsWithSortOrder.hpp"
83
71
  #include "FilterForSamples.hpp"
84
72
  #include "FilterForSamplesBase.hpp"
@@ -18,14 +18,6 @@ namespace margelo::nitro::healthkit { struct HeartbeatSeriesSample; }
18
18
  namespace margelo::nitro::healthkit { struct Heartbeat; }
19
19
  // Forward declaration of `SampleType` to properly resolve imports.
20
20
  namespace margelo::nitro::healthkit { struct SampleType; }
21
- // Forward declaration of `WeatherCondition` to properly resolve imports.
22
- namespace margelo::nitro::healthkit { enum class WeatherCondition; }
23
- // Forward declaration of `Quantity` to properly resolve imports.
24
- namespace margelo::nitro::healthkit { struct Quantity; }
25
- // Forward declaration of `InsulinDeliveryReason` to properly resolve imports.
26
- namespace margelo::nitro::healthkit { enum class InsulinDeliveryReason; }
27
- // Forward declaration of `HeartRateMotionContext` to properly resolve imports.
28
- namespace margelo::nitro::healthkit { enum class HeartRateMotionContext; }
29
21
  // Forward declaration of `SourceRevision` to properly resolve imports.
30
22
  namespace margelo::nitro::healthkit { struct SourceRevision; }
31
23
  // Forward declaration of `HybridSourceProxySpec` to properly resolve imports.
@@ -60,16 +52,12 @@ namespace margelo::nitro::healthkit { struct QueryOptionsWithAnchor; }
60
52
  #include "SampleType.hpp"
61
53
  #include <string>
62
54
  #include <chrono>
63
- #include "WeatherCondition.hpp"
64
- #include <optional>
65
- #include "Quantity.hpp"
66
- #include "InsulinDeliveryReason.hpp"
67
- #include "HeartRateMotionContext.hpp"
55
+ #include <NitroModules/AnyMap.hpp>
68
56
  #include "SourceRevision.hpp"
69
57
  #include <memory>
70
58
  #include "HybridSourceProxySpec.hpp"
59
+ #include <optional>
71
60
  #include "Device.hpp"
72
- #include <NitroModules/AnyMap.hpp>
73
61
  #include "QueryOptionsWithSortOrder.hpp"
74
62
  #include "FilterForSamples.hpp"
75
63
  #include "FilterForSamplesBase.hpp"
@@ -28,14 +28,6 @@ namespace margelo::nitro::healthkit { enum class MedicationDoseEventScheduleType
28
28
  namespace margelo::nitro::healthkit { enum class MedicationDoseEventLogStatus; }
29
29
  // Forward declaration of `SampleType` to properly resolve imports.
30
30
  namespace margelo::nitro::healthkit { struct SampleType; }
31
- // Forward declaration of `WeatherCondition` to properly resolve imports.
32
- namespace margelo::nitro::healthkit { enum class WeatherCondition; }
33
- // Forward declaration of `Quantity` to properly resolve imports.
34
- namespace margelo::nitro::healthkit { struct Quantity; }
35
- // Forward declaration of `InsulinDeliveryReason` to properly resolve imports.
36
- namespace margelo::nitro::healthkit { enum class InsulinDeliveryReason; }
37
- // Forward declaration of `HeartRateMotionContext` to properly resolve imports.
38
- namespace margelo::nitro::healthkit { enum class HeartRateMotionContext; }
39
31
  // Forward declaration of `SourceRevision` to properly resolve imports.
40
32
  namespace margelo::nitro::healthkit { struct SourceRevision; }
41
33
  // Forward declaration of `HybridSourceProxySpec` to properly resolve imports.
@@ -76,15 +68,11 @@ namespace margelo::nitro::healthkit { struct QueryOptionsWithAnchor; }
76
68
  #include <chrono>
77
69
  #include "MedicationDoseEventLogStatus.hpp"
78
70
  #include "SampleType.hpp"
79
- #include "WeatherCondition.hpp"
80
- #include "Quantity.hpp"
81
- #include "InsulinDeliveryReason.hpp"
82
- #include "HeartRateMotionContext.hpp"
71
+ #include <NitroModules/AnyMap.hpp>
83
72
  #include "SourceRevision.hpp"
84
73
  #include <memory>
85
74
  #include "HybridSourceProxySpec.hpp"
86
75
  #include "Device.hpp"
87
- #include <NitroModules/AnyMap.hpp>
88
76
  #include "QueryOptionsWithSortOrder.hpp"
89
77
  #include "FilterForSamples.hpp"
90
78
  #include "FilterForSamplesBase.hpp"
@@ -20,14 +20,6 @@ namespace margelo::nitro::healthkit { enum class AggregationStyle; }
20
20
  namespace margelo::nitro::healthkit { struct QuantitySample; }
21
21
  // Forward declaration of `SampleType` to properly resolve imports.
22
22
  namespace margelo::nitro::healthkit { struct SampleType; }
23
- // Forward declaration of `WeatherCondition` to properly resolve imports.
24
- namespace margelo::nitro::healthkit { enum class WeatherCondition; }
25
- // Forward declaration of `Quantity` to properly resolve imports.
26
- namespace margelo::nitro::healthkit { struct Quantity; }
27
- // Forward declaration of `InsulinDeliveryReason` to properly resolve imports.
28
- namespace margelo::nitro::healthkit { enum class InsulinDeliveryReason; }
29
- // Forward declaration of `HeartRateMotionContext` to properly resolve imports.
30
- namespace margelo::nitro::healthkit { enum class HeartRateMotionContext; }
31
23
  // Forward declaration of `SourceRevision` to properly resolve imports.
32
24
  namespace margelo::nitro::healthkit { struct SourceRevision; }
33
25
  // Forward declaration of `HybridSourceProxySpec` to properly resolve imports.
@@ -36,8 +28,8 @@ namespace margelo::nitro::healthkit { class HybridSourceProxySpec; }
36
28
  namespace margelo::nitro::healthkit { struct Device; }
37
29
  // Forward declaration of `QuantityTypeIdentifierWriteable` to properly resolve imports.
38
30
  namespace margelo::nitro::healthkit { enum class QuantityTypeIdentifierWriteable; }
39
- // Forward declaration of `QueryOptionsWithSortOrderAndUnit` to properly resolve imports.
40
- namespace margelo::nitro::healthkit { struct QueryOptionsWithSortOrderAndUnit; }
31
+ // Forward declaration of `QueryOptionsWithSortOrderAndStringUnit` to properly resolve imports.
32
+ namespace margelo::nitro::healthkit { struct QueryOptionsWithSortOrderAndStringUnit; }
41
33
  // Forward declaration of `FilterForSamples` to properly resolve imports.
42
34
  namespace margelo::nitro::healthkit { struct FilterForSamples; }
43
35
  // Forward declaration of `FilterForSamplesBase` to properly resolve imports.
@@ -52,12 +44,14 @@ namespace margelo::nitro::healthkit { struct DateFilter; }
52
44
  namespace margelo::nitro::healthkit { class HybridWorkoutProxySpec; }
53
45
  // Forward declaration of `QueryStatisticsResponse` to properly resolve imports.
54
46
  namespace margelo::nitro::healthkit { struct QueryStatisticsResponse; }
47
+ // Forward declaration of `Quantity` to properly resolve imports.
48
+ namespace margelo::nitro::healthkit { struct Quantity; }
55
49
  // Forward declaration of `QuantityDateInterval` to properly resolve imports.
56
50
  namespace margelo::nitro::healthkit { struct QuantityDateInterval; }
57
51
  // Forward declaration of `StatisticsOptions` to properly resolve imports.
58
52
  namespace margelo::nitro::healthkit { enum class StatisticsOptions; }
59
- // Forward declaration of `StatisticsQueryOptions` to properly resolve imports.
60
- namespace margelo::nitro::healthkit { struct StatisticsQueryOptions; }
53
+ // Forward declaration of `StatisticsQueryOptionsWithStringUnit` to properly resolve imports.
54
+ namespace margelo::nitro::healthkit { struct StatisticsQueryOptionsWithStringUnit; }
61
55
  // Forward declaration of `IntervalComponents` to properly resolve imports.
62
56
  namespace margelo::nitro::healthkit { struct IntervalComponents; }
63
57
  // Forward declaration of `QueryStatisticsResponseFromSingleSource` to properly resolve imports.
@@ -66,8 +60,8 @@ namespace margelo::nitro::healthkit { struct QueryStatisticsResponseFromSingleSo
66
60
  namespace margelo::nitro::healthkit { struct QuantitySamplesWithAnchorResponse; }
67
61
  // Forward declaration of `DeletedSample` to properly resolve imports.
68
62
  namespace margelo::nitro::healthkit { struct DeletedSample; }
69
- // Forward declaration of `QueryOptionsWithAnchorAndUnit` to properly resolve imports.
70
- namespace margelo::nitro::healthkit { struct QueryOptionsWithAnchorAndUnit; }
63
+ // Forward declaration of `QueryOptionsWithAnchorAndStringUnit` to properly resolve imports.
64
+ namespace margelo::nitro::healthkit { struct QueryOptionsWithAnchorAndStringUnit; }
71
65
 
72
66
  #include "QuantityTypeIdentifier.hpp"
73
67
  #include <string>
@@ -77,18 +71,14 @@ namespace margelo::nitro::healthkit { struct QueryOptionsWithAnchorAndUnit; }
77
71
  #include <NitroModules/Promise.hpp>
78
72
  #include "SampleType.hpp"
79
73
  #include <chrono>
80
- #include "WeatherCondition.hpp"
81
- #include "Quantity.hpp"
82
- #include "InsulinDeliveryReason.hpp"
83
- #include "HeartRateMotionContext.hpp"
74
+ #include <NitroModules/AnyMap.hpp>
84
75
  #include "SourceRevision.hpp"
85
76
  #include <memory>
86
77
  #include "HybridSourceProxySpec.hpp"
87
78
  #include "Device.hpp"
88
- #include <NitroModules/AnyMap.hpp>
89
79
  #include "QuantityTypeIdentifierWriteable.hpp"
90
80
  #include <vector>
91
- #include "QueryOptionsWithSortOrderAndUnit.hpp"
81
+ #include "QueryOptionsWithSortOrderAndStringUnit.hpp"
92
82
  #include "FilterForSamples.hpp"
93
83
  #include "FilterForSamplesBase.hpp"
94
84
  #include "PredicateWithMetadataKey.hpp"
@@ -97,14 +87,15 @@ namespace margelo::nitro::healthkit { struct QueryOptionsWithAnchorAndUnit; }
97
87
  #include "DateFilter.hpp"
98
88
  #include "HybridWorkoutProxySpec.hpp"
99
89
  #include "QueryStatisticsResponse.hpp"
90
+ #include "Quantity.hpp"
100
91
  #include "QuantityDateInterval.hpp"
101
92
  #include "StatisticsOptions.hpp"
102
- #include "StatisticsQueryOptions.hpp"
93
+ #include "StatisticsQueryOptionsWithStringUnit.hpp"
103
94
  #include "IntervalComponents.hpp"
104
95
  #include "QueryStatisticsResponseFromSingleSource.hpp"
105
96
  #include "QuantitySamplesWithAnchorResponse.hpp"
106
97
  #include "DeletedSample.hpp"
107
- #include "QueryOptionsWithAnchorAndUnit.hpp"
98
+ #include "QueryOptionsWithAnchorAndStringUnit.hpp"
108
99
 
109
100
  #include "ReactNativeHealthkit-Swift-Cxx-Umbrella.hpp"
110
101
 
@@ -180,7 +171,7 @@ namespace margelo::nitro::healthkit {
180
171
  auto __value = std::move(__result.value());
181
172
  return __value;
182
173
  }
183
- inline std::shared_ptr<Promise<std::vector<QuantitySample>>> queryQuantitySamples(QuantityTypeIdentifier identifier, const QueryOptionsWithSortOrderAndUnit& options) override {
174
+ inline std::shared_ptr<Promise<std::vector<QuantitySample>>> queryQuantitySamples(QuantityTypeIdentifier identifier, const QueryOptionsWithSortOrderAndStringUnit& options) override {
184
175
  auto __result = _swiftPart.queryQuantitySamples(static_cast<int>(identifier), std::forward<decltype(options)>(options));
185
176
  if (__result.hasError()) [[unlikely]] {
186
177
  std::rethrow_exception(__result.error());
@@ -188,7 +179,7 @@ namespace margelo::nitro::healthkit {
188
179
  auto __value = std::move(__result.value());
189
180
  return __value;
190
181
  }
191
- inline std::shared_ptr<Promise<QueryStatisticsResponse>> queryStatisticsForQuantity(QuantityTypeIdentifier identifier, const std::vector<StatisticsOptions>& statistics, const std::optional<StatisticsQueryOptions>& options) override {
182
+ inline std::shared_ptr<Promise<QueryStatisticsResponse>> queryStatisticsForQuantity(QuantityTypeIdentifier identifier, const std::vector<StatisticsOptions>& statistics, const std::optional<StatisticsQueryOptionsWithStringUnit>& options) override {
192
183
  auto __result = _swiftPart.queryStatisticsForQuantity(static_cast<int>(identifier), statistics, options);
193
184
  if (__result.hasError()) [[unlikely]] {
194
185
  std::rethrow_exception(__result.error());
@@ -196,7 +187,7 @@ namespace margelo::nitro::healthkit {
196
187
  auto __value = std::move(__result.value());
197
188
  return __value;
198
189
  }
199
- inline std::shared_ptr<Promise<std::vector<QueryStatisticsResponse>>> queryStatisticsCollectionForQuantity(QuantityTypeIdentifier identifier, const std::vector<StatisticsOptions>& statistics, std::chrono::system_clock::time_point anchorDate, const IntervalComponents& intervalComponents, const std::optional<StatisticsQueryOptions>& options) override {
190
+ inline std::shared_ptr<Promise<std::vector<QueryStatisticsResponse>>> queryStatisticsCollectionForQuantity(QuantityTypeIdentifier identifier, const std::vector<StatisticsOptions>& statistics, std::chrono::system_clock::time_point anchorDate, const IntervalComponents& intervalComponents, const std::optional<StatisticsQueryOptionsWithStringUnit>& options) override {
200
191
  auto __result = _swiftPart.queryStatisticsCollectionForQuantity(static_cast<int>(identifier), statistics, anchorDate, std::forward<decltype(intervalComponents)>(intervalComponents), options);
201
192
  if (__result.hasError()) [[unlikely]] {
202
193
  std::rethrow_exception(__result.error());
@@ -204,7 +195,7 @@ namespace margelo::nitro::healthkit {
204
195
  auto __value = std::move(__result.value());
205
196
  return __value;
206
197
  }
207
- inline std::shared_ptr<Promise<std::vector<QueryStatisticsResponseFromSingleSource>>> queryStatisticsForQuantitySeparateBySource(QuantityTypeIdentifier identifier, const std::vector<StatisticsOptions>& statistics, const std::optional<StatisticsQueryOptions>& options) override {
198
+ inline std::shared_ptr<Promise<std::vector<QueryStatisticsResponseFromSingleSource>>> queryStatisticsForQuantitySeparateBySource(QuantityTypeIdentifier identifier, const std::vector<StatisticsOptions>& statistics, const std::optional<StatisticsQueryOptionsWithStringUnit>& options) override {
208
199
  auto __result = _swiftPart.queryStatisticsForQuantitySeparateBySource(static_cast<int>(identifier), statistics, options);
209
200
  if (__result.hasError()) [[unlikely]] {
210
201
  std::rethrow_exception(__result.error());
@@ -212,7 +203,7 @@ namespace margelo::nitro::healthkit {
212
203
  auto __value = std::move(__result.value());
213
204
  return __value;
214
205
  }
215
- inline std::shared_ptr<Promise<std::vector<QueryStatisticsResponseFromSingleSource>>> queryStatisticsCollectionForQuantitySeparateBySource(QuantityTypeIdentifier identifier, const std::vector<StatisticsOptions>& statistics, std::chrono::system_clock::time_point anchorDate, const IntervalComponents& intervalComponents, const std::optional<StatisticsQueryOptions>& options) override {
206
+ inline std::shared_ptr<Promise<std::vector<QueryStatisticsResponseFromSingleSource>>> queryStatisticsCollectionForQuantitySeparateBySource(QuantityTypeIdentifier identifier, const std::vector<StatisticsOptions>& statistics, std::chrono::system_clock::time_point anchorDate, const IntervalComponents& intervalComponents, const std::optional<StatisticsQueryOptionsWithStringUnit>& options) override {
216
207
  auto __result = _swiftPart.queryStatisticsCollectionForQuantitySeparateBySource(static_cast<int>(identifier), statistics, anchorDate, std::forward<decltype(intervalComponents)>(intervalComponents), options);
217
208
  if (__result.hasError()) [[unlikely]] {
218
209
  std::rethrow_exception(__result.error());
@@ -220,7 +211,7 @@ namespace margelo::nitro::healthkit {
220
211
  auto __value = std::move(__result.value());
221
212
  return __value;
222
213
  }
223
- inline std::shared_ptr<Promise<QuantitySamplesWithAnchorResponse>> queryQuantitySamplesWithAnchor(QuantityTypeIdentifier identifier, const QueryOptionsWithAnchorAndUnit& options) override {
214
+ inline std::shared_ptr<Promise<QuantitySamplesWithAnchorResponse>> queryQuantitySamplesWithAnchor(QuantityTypeIdentifier identifier, const QueryOptionsWithAnchorAndStringUnit& options) override {
224
215
  auto __result = _swiftPart.queryQuantitySamplesWithAnchor(static_cast<int>(identifier), std::forward<decltype(options)>(options));
225
216
  if (__result.hasError()) [[unlikely]] {
226
217
  std::rethrow_exception(__result.error());
@@ -24,14 +24,6 @@ namespace margelo::nitro::healthkit { enum class StateOfMindAssociation; }
24
24
  namespace margelo::nitro::healthkit { enum class StateOfMindLabel; }
25
25
  // Forward declaration of `SampleType` to properly resolve imports.
26
26
  namespace margelo::nitro::healthkit { struct SampleType; }
27
- // Forward declaration of `WeatherCondition` to properly resolve imports.
28
- namespace margelo::nitro::healthkit { enum class WeatherCondition; }
29
- // Forward declaration of `Quantity` to properly resolve imports.
30
- namespace margelo::nitro::healthkit { struct Quantity; }
31
- // Forward declaration of `InsulinDeliveryReason` to properly resolve imports.
32
- namespace margelo::nitro::healthkit { enum class InsulinDeliveryReason; }
33
- // Forward declaration of `HeartRateMotionContext` to properly resolve imports.
34
- namespace margelo::nitro::healthkit { enum class HeartRateMotionContext; }
35
27
  // Forward declaration of `SourceRevision` to properly resolve imports.
36
28
  namespace margelo::nitro::healthkit { struct SourceRevision; }
37
29
  // Forward declaration of `HybridSourceProxySpec` to properly resolve imports.
@@ -69,16 +61,12 @@ namespace margelo::nitro::healthkit { struct QueryOptionsWithAnchor; }
69
61
  #include "SampleType.hpp"
70
62
  #include <string>
71
63
  #include <chrono>
72
- #include "WeatherCondition.hpp"
73
- #include <optional>
74
- #include "Quantity.hpp"
75
- #include "InsulinDeliveryReason.hpp"
76
- #include "HeartRateMotionContext.hpp"
64
+ #include <NitroModules/AnyMap.hpp>
77
65
  #include "SourceRevision.hpp"
78
66
  #include <memory>
79
67
  #include "HybridSourceProxySpec.hpp"
68
+ #include <optional>
80
69
  #include "Device.hpp"
81
- #include <NitroModules/AnyMap.hpp>
82
70
  #include "QueryOptionsWithSortOrder.hpp"
83
71
  #include "FilterForSamples.hpp"
84
72
  #include "FilterForSamplesBase.hpp"