@kingstinct/react-native-healthkit 13.2.0 → 13.2.2

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 (328) hide show
  1. package/ios/Constants.swift +1 -1
  2. package/ios/QuantityTypeModule.swift +97 -64
  3. package/ios/WorkoutProxy.swift +4 -0
  4. package/lib/typescript/healthkit.d.ts +2 -2
  5. package/lib/typescript/healthkit.ios.d.ts +4 -4
  6. package/lib/typescript/specs/CoreModule.nitro.d.ts +1 -1
  7. package/lib/typescript/specs/QuantityTypeModule.nitro.d.ts +2 -2
  8. package/lib/typescript/types/QuantityType.d.ts +1 -1
  9. package/lib/typescript/types/QueryOptions.d.ts +5 -4
  10. package/lib/typescript/types/Workouts.d.ts +3 -3
  11. package/nitrogen/generated/ios/ReactNativeHealthkit+autolinking.rb +2 -2
  12. package/nitrogen/generated/ios/ReactNativeHealthkit-Swift-Cxx-Bridge.cpp +1 -1
  13. package/nitrogen/generated/ios/ReactNativeHealthkit-Swift-Cxx-Bridge.hpp +68 -68
  14. package/nitrogen/generated/ios/ReactNativeHealthkit-Swift-Cxx-Umbrella.hpp +4 -1
  15. package/nitrogen/generated/ios/ReactNativeHealthkitAutolinking.mm +1 -1
  16. package/nitrogen/generated/ios/ReactNativeHealthkitAutolinking.swift +45 -71
  17. package/nitrogen/generated/ios/c++/HybridCategoryTypeModuleSpecSwift.cpp +1 -1
  18. package/nitrogen/generated/ios/c++/HybridCategoryTypeModuleSpecSwift.hpp +7 -1
  19. package/nitrogen/generated/ios/c++/HybridCharacteristicTypeModuleSpecSwift.cpp +1 -1
  20. package/nitrogen/generated/ios/c++/HybridCharacteristicTypeModuleSpecSwift.hpp +7 -1
  21. package/nitrogen/generated/ios/c++/HybridCoreModuleSpecSwift.cpp +1 -1
  22. package/nitrogen/generated/ios/c++/HybridCoreModuleSpecSwift.hpp +7 -1
  23. package/nitrogen/generated/ios/c++/HybridCorrelationTypeModuleSpecSwift.cpp +1 -1
  24. package/nitrogen/generated/ios/c++/HybridCorrelationTypeModuleSpecSwift.hpp +7 -1
  25. package/nitrogen/generated/ios/c++/HybridElectrocardiogramModuleSpecSwift.cpp +1 -1
  26. package/nitrogen/generated/ios/c++/HybridElectrocardiogramModuleSpecSwift.hpp +7 -1
  27. package/nitrogen/generated/ios/c++/HybridHeartbeatSeriesModuleSpecSwift.cpp +1 -1
  28. package/nitrogen/generated/ios/c++/HybridHeartbeatSeriesModuleSpecSwift.hpp +7 -1
  29. package/nitrogen/generated/ios/c++/HybridMedicationModuleSpecSwift.cpp +1 -1
  30. package/nitrogen/generated/ios/c++/HybridMedicationModuleSpecSwift.hpp +7 -1
  31. package/nitrogen/generated/ios/c++/HybridQuantityTypeModuleSpecSwift.cpp +1 -1
  32. package/nitrogen/generated/ios/c++/HybridQuantityTypeModuleSpecSwift.hpp +11 -2
  33. package/nitrogen/generated/ios/c++/HybridSourceProxySpecSwift.cpp +1 -1
  34. package/nitrogen/generated/ios/c++/HybridSourceProxySpecSwift.hpp +7 -1
  35. package/nitrogen/generated/ios/c++/HybridStateOfMindModuleSpecSwift.cpp +1 -1
  36. package/nitrogen/generated/ios/c++/HybridStateOfMindModuleSpecSwift.hpp +7 -1
  37. package/nitrogen/generated/ios/c++/HybridWorkoutProxySpecSwift.cpp +1 -1
  38. package/nitrogen/generated/ios/c++/HybridWorkoutProxySpecSwift.hpp +7 -1
  39. package/nitrogen/generated/ios/c++/HybridWorkoutsModuleSpecSwift.cpp +1 -1
  40. package/nitrogen/generated/ios/c++/HybridWorkoutsModuleSpecSwift.hpp +7 -1
  41. package/nitrogen/generated/ios/swift/AggregationStyle.swift +1 -1
  42. package/nitrogen/generated/ios/swift/AuthDataTypes.swift +19 -56
  43. package/nitrogen/generated/ios/swift/AuthorizationRequestStatus.swift +1 -1
  44. package/nitrogen/generated/ios/swift/AuthorizationStatus.swift +1 -1
  45. package/nitrogen/generated/ios/swift/BiologicalSex.swift +1 -1
  46. package/nitrogen/generated/ios/swift/BloodType.swift +1 -1
  47. package/nitrogen/generated/ios/swift/CategorySample.swift +166 -445
  48. package/nitrogen/generated/ios/swift/CategorySampleForSaving.swift +13 -56
  49. package/nitrogen/generated/ios/swift/CategorySamplesWithAnchorResponse.swift +7 -38
  50. package/nitrogen/generated/ios/swift/CategoryTypeIdentifier.swift +1 -1
  51. package/nitrogen/generated/ios/swift/ComparisonPredicateOperator.swift +1 -1
  52. package/nitrogen/generated/ios/swift/CorrelationObject.swift +1 -1
  53. package/nitrogen/generated/ios/swift/CorrelationSample.swift +187 -491
  54. package/nitrogen/generated/ios/swift/CorrelationTypeIdentifier.swift +1 -1
  55. package/nitrogen/generated/ios/swift/DateFilter.swift +37 -86
  56. package/nitrogen/generated/ios/swift/DeletedSample.swift +12 -31
  57. package/nitrogen/generated/ios/swift/Device.swift +73 -170
  58. package/nitrogen/generated/ios/swift/ECGQueryOptionsWithAnchor.swift +16 -53
  59. package/nitrogen/generated/ios/swift/ECGQueryOptionsWithSortOrder.swift +23 -66
  60. package/nitrogen/generated/ios/swift/ElectrocardiogramClassification.swift +1 -1
  61. package/nitrogen/generated/ios/swift/ElectrocardiogramLead.swift +1 -1
  62. package/nitrogen/generated/ios/swift/ElectrocardiogramSample.swift +195 -508
  63. package/nitrogen/generated/ios/swift/ElectrocardiogramSamplesWithAnchorResponse.swift +7 -38
  64. package/nitrogen/generated/ios/swift/ElectrocardiogramSymptomsStatus.swift +1 -1
  65. package/nitrogen/generated/ios/swift/ElectrocardiogramVoltage.swift +7 -26
  66. package/nitrogen/generated/ios/swift/FilterForSamples.swift +96 -241
  67. package/nitrogen/generated/ios/swift/FilterForSamplesBase.swift +49 -140
  68. package/nitrogen/generated/ios/swift/FilterForWorkouts.swift +67 -221
  69. package/nitrogen/generated/ios/swift/FilterForWorkoutsBase.swift +40 -140
  70. package/nitrogen/generated/ios/swift/FitzpatrickSkinType.swift +1 -1
  71. package/nitrogen/generated/ios/swift/Func_void.swift +1 -2
  72. package/nitrogen/generated/ios/swift/Func_void_AuthorizationRequestStatus.swift +1 -2
  73. package/nitrogen/generated/ios/swift/Func_void_BiologicalSex.swift +1 -2
  74. package/nitrogen/generated/ios/swift/Func_void_BloodType.swift +1 -2
  75. package/nitrogen/generated/ios/swift/Func_void_CategorySamplesWithAnchorResponse.swift +1 -2
  76. package/nitrogen/generated/ios/swift/Func_void_ElectrocardiogramSamplesWithAnchorResponse.swift +1 -2
  77. package/nitrogen/generated/ios/swift/Func_void_FitzpatrickSkinType.swift +1 -2
  78. package/nitrogen/generated/ios/swift/Func_void_HeartbeatSeriesSamplesWithAnchorResponse.swift +1 -2
  79. package/nitrogen/generated/ios/swift/Func_void_MedicationDoseEventsWithAnchorResponse.swift +1 -2
  80. package/nitrogen/generated/ios/swift/Func_void_OnChangeCallbackArgs.swift +1 -2
  81. package/nitrogen/generated/ios/swift/Func_void_QuantitySamplesWithAnchorResponse.swift +1 -2
  82. package/nitrogen/generated/ios/swift/Func_void_QueryCorrelationSamplesWithAnchorResponse.swift +1 -2
  83. package/nitrogen/generated/ios/swift/Func_void_QueryStatisticsResponse.swift +1 -2
  84. package/nitrogen/generated/ios/swift/Func_void_QueryWorkoutSamplesWithAnchorResponse.swift +1 -2
  85. package/nitrogen/generated/ios/swift/Func_void_StateOfMindSamplesWithAnchorResponse.swift +1 -2
  86. package/nitrogen/generated/ios/swift/Func_void_WheelchairUse.swift +1 -2
  87. package/nitrogen/generated/ios/swift/Func_void_bool.swift +1 -2
  88. package/nitrogen/generated/ios/swift/Func_void_double.swift +1 -2
  89. package/nitrogen/generated/ios/swift/Func_void_std__exception_ptr.swift +1 -2
  90. package/nitrogen/generated/ios/swift/Func_void_std__optional_CategorySample_.swift +1 -2
  91. package/nitrogen/generated/ios/swift/Func_void_std__optional_CorrelationSample_.swift +1 -2
  92. package/nitrogen/generated/ios/swift/Func_void_std__optional_QuantitySample_.swift +1 -2
  93. package/nitrogen/generated/ios/swift/Func_void_std__optional_QueryStatisticsResponse_.swift +1 -2
  94. package/nitrogen/generated/ios/swift/Func_void_std__optional_StateOfMindSample_.swift +1 -2
  95. package/nitrogen/generated/ios/swift/Func_void_std__optional_WorkoutPlan_.swift +1 -2
  96. package/nitrogen/generated/ios/swift/Func_void_std__optional_std__chrono__system_clock__time_point_.swift +1 -2
  97. package/nitrogen/generated/ios/swift/Func_void_std__shared_ptr_HybridWorkoutProxySpec_.swift +2 -3
  98. package/nitrogen/generated/ios/swift/Func_void_std__unordered_map_std__string__QueryStatisticsResponse_.swift +1 -2
  99. package/nitrogen/generated/ios/swift/Func_void_std__unordered_map_std__string__bool_.swift +1 -2
  100. package/nitrogen/generated/ios/swift/Func_void_std__vector_CategorySample_.swift +1 -2
  101. package/nitrogen/generated/ios/swift/Func_void_std__vector_CorrelationSample_.swift +1 -2
  102. package/nitrogen/generated/ios/swift/Func_void_std__vector_ElectrocardiogramSample_.swift +1 -2
  103. package/nitrogen/generated/ios/swift/Func_void_std__vector_HeartbeatSeriesSample_.swift +1 -2
  104. package/nitrogen/generated/ios/swift/Func_void_std__vector_IdentifierWithUnit_.swift +1 -2
  105. package/nitrogen/generated/ios/swift/Func_void_std__vector_MedicationDoseEvent_.swift +1 -2
  106. package/nitrogen/generated/ios/swift/Func_void_std__vector_QuantitySample_.swift +1 -2
  107. package/nitrogen/generated/ios/swift/Func_void_std__vector_QueryStatisticsResponseFromSingleSource_.swift +1 -2
  108. package/nitrogen/generated/ios/swift/Func_void_std__vector_QueryStatisticsResponse_.swift +1 -2
  109. package/nitrogen/generated/ios/swift/Func_void_std__vector_StateOfMindSample_.swift +1 -2
  110. package/nitrogen/generated/ios/swift/Func_void_std__vector_UserAnnotatedMedication_.swift +1 -2
  111. package/nitrogen/generated/ios/swift/Func_void_std__vector_WorkoutRoute_.swift +1 -2
  112. package/nitrogen/generated/ios/swift/Func_void_std__vector_std__shared_ptr_HybridSourceProxySpec__.swift +2 -3
  113. package/nitrogen/generated/ios/swift/Func_void_std__vector_std__shared_ptr_HybridWorkoutProxySpec__.swift +2 -3
  114. package/nitrogen/generated/ios/swift/GeneralForm.swift +1 -1
  115. package/nitrogen/generated/ios/swift/HeartRateMotionContext.swift +1 -1
  116. package/nitrogen/generated/ios/swift/Heartbeat.swift +5 -18
  117. package/nitrogen/generated/ios/swift/HeartbeatSeriesSample.swift +164 -443
  118. package/nitrogen/generated/ios/swift/HeartbeatSeriesSamplesWithAnchorResponse.swift +7 -38
  119. package/nitrogen/generated/ios/swift/HybridCategoryTypeModuleSpec.swift +3 -4
  120. package/nitrogen/generated/ios/swift/HybridCategoryTypeModuleSpec_cxx.swift +9 -2
  121. package/nitrogen/generated/ios/swift/HybridCharacteristicTypeModuleSpec.swift +3 -4
  122. package/nitrogen/generated/ios/swift/HybridCharacteristicTypeModuleSpec_cxx.swift +9 -2
  123. package/nitrogen/generated/ios/swift/HybridCoreModuleSpec.swift +3 -4
  124. package/nitrogen/generated/ios/swift/HybridCoreModuleSpec_cxx.swift +9 -2
  125. package/nitrogen/generated/ios/swift/HybridCorrelationTypeModuleSpec.swift +3 -4
  126. package/nitrogen/generated/ios/swift/HybridCorrelationTypeModuleSpec_cxx.swift +9 -2
  127. package/nitrogen/generated/ios/swift/HybridElectrocardiogramModuleSpec.swift +3 -4
  128. package/nitrogen/generated/ios/swift/HybridElectrocardiogramModuleSpec_cxx.swift +9 -2
  129. package/nitrogen/generated/ios/swift/HybridHeartbeatSeriesModuleSpec.swift +3 -4
  130. package/nitrogen/generated/ios/swift/HybridHeartbeatSeriesModuleSpec_cxx.swift +9 -2
  131. package/nitrogen/generated/ios/swift/HybridMedicationModuleSpec.swift +3 -4
  132. package/nitrogen/generated/ios/swift/HybridMedicationModuleSpec_cxx.swift +9 -2
  133. package/nitrogen/generated/ios/swift/HybridQuantityTypeModuleSpec.swift +4 -5
  134. package/nitrogen/generated/ios/swift/HybridQuantityTypeModuleSpec_cxx.swift +10 -3
  135. package/nitrogen/generated/ios/swift/HybridSourceProxySpec.swift +3 -4
  136. package/nitrogen/generated/ios/swift/HybridSourceProxySpec_cxx.swift +9 -2
  137. package/nitrogen/generated/ios/swift/HybridStateOfMindModuleSpec.swift +3 -4
  138. package/nitrogen/generated/ios/swift/HybridStateOfMindModuleSpec_cxx.swift +9 -2
  139. package/nitrogen/generated/ios/swift/HybridWorkoutProxySpec.swift +3 -4
  140. package/nitrogen/generated/ios/swift/HybridWorkoutProxySpec_cxx.swift +9 -2
  141. package/nitrogen/generated/ios/swift/HybridWorkoutsModuleSpec.swift +3 -4
  142. package/nitrogen/generated/ios/swift/HybridWorkoutsModuleSpec_cxx.swift +9 -2
  143. package/nitrogen/generated/ios/swift/IdentifierWithUnit.swift +5 -18
  144. package/nitrogen/generated/ios/swift/InsulinDeliveryReason.swift +1 -1
  145. package/nitrogen/generated/ios/swift/IntervalComponents.swift +46 -72
  146. package/nitrogen/generated/ios/swift/LocationForSaving.swift +17 -66
  147. package/nitrogen/generated/ios/swift/MedicationConcept.swift +9 -40
  148. package/nitrogen/generated/ios/swift/MedicationDoseEvent.swift +206 -531
  149. package/nitrogen/generated/ios/swift/MedicationDoseEventLogStatus.swift +1 -1
  150. package/nitrogen/generated/ios/swift/MedicationDoseEventScheduleType.swift +1 -1
  151. package/nitrogen/generated/ios/swift/MedicationDoseEventsWithAnchorResponse.swift +7 -38
  152. package/nitrogen/generated/ios/swift/ObjectTypeIdentifier.swift +1 -1
  153. package/nitrogen/generated/ios/swift/OnChangeCallbackArgs.swift +12 -31
  154. package/nitrogen/generated/ios/swift/PerObjectTypeIdentifier.swift +1 -1
  155. package/nitrogen/generated/ios/swift/PredicateWithMetadataKey.swift +32 -74
  156. package/nitrogen/generated/ios/swift/Quantity.swift +5 -18
  157. package/nitrogen/generated/ios/swift/QuantityDateInterval.swift +5 -18
  158. package/nitrogen/generated/ios/swift/QuantitySample.swift +168 -453
  159. package/nitrogen/generated/ios/swift/QuantitySampleForSaving.swift +22 -77
  160. package/nitrogen/generated/ios/swift/QuantitySamplesWithAnchorResponse.swift +7 -38
  161. package/nitrogen/generated/ios/swift/QuantityTypeIdentifier.swift +1 -1
  162. package/nitrogen/generated/ios/swift/QuantityTypeIdentifierWriteable.swift +496 -0
  163. package/nitrogen/generated/ios/swift/QueryCorrelationSamplesWithAnchorResponse.swift +7 -38
  164. package/nitrogen/generated/ios/swift/QueryOptionsWithAnchor.swift +14 -45
  165. package/nitrogen/generated/ios/swift/QueryOptionsWithAnchorAndUnit.swift +23 -66
  166. package/nitrogen/generated/ios/swift/QueryOptionsWithSortOrder.swift +14 -45
  167. package/nitrogen/generated/ios/swift/QueryOptionsWithSortOrderAndUnit.swift +23 -66
  168. package/nitrogen/generated/ios/swift/QueryStatisticsResponse.swift +39 -163
  169. package/nitrogen/generated/ios/swift/QueryStatisticsResponseFromSingleSource.swift +39 -157
  170. package/nitrogen/generated/ios/swift/QueryWorkoutSamplesWithAnchorResponse.swift +11 -45
  171. package/nitrogen/generated/ios/swift/RelatedCoding.swift +14 -39
  172. package/nitrogen/generated/ios/swift/SampleForSaving.swift +1 -1
  173. package/nitrogen/generated/ios/swift/SampleType.swift +9 -34
  174. package/nitrogen/generated/ios/swift/SampleTypeIdentifier.swift +1 -1
  175. package/nitrogen/generated/ios/swift/SampleTypeIdentifierWriteable.swift +1 -1
  176. package/nitrogen/generated/ios/swift/Source.swift +5 -18
  177. package/nitrogen/generated/ios/swift/SourceRevision.swift +27 -67
  178. package/nitrogen/generated/ios/swift/StateOfMindAssociation.swift +1 -1
  179. package/nitrogen/generated/ios/swift/StateOfMindKind.swift +1 -1
  180. package/nitrogen/generated/ios/swift/StateOfMindLabel.swift +1 -1
  181. package/nitrogen/generated/ios/swift/StateOfMindSample.swift +172 -481
  182. package/nitrogen/generated/ios/swift/StateOfMindSamplesWithAnchorResponse.swift +7 -38
  183. package/nitrogen/generated/ios/swift/StateOfMindValenceClassification.swift +1 -1
  184. package/nitrogen/generated/ios/swift/StatisticsOptions.swift +1 -1
  185. package/nitrogen/generated/ios/swift/StatisticsQueryOptions.swift +12 -37
  186. package/nitrogen/generated/ios/swift/UpdateFrequency.swift +1 -1
  187. package/nitrogen/generated/ios/swift/UserAnnotatedMedication.swift +16 -47
  188. package/nitrogen/generated/ios/swift/Variant_Bool_String_Double_Date.swift +1 -1
  189. package/nitrogen/generated/ios/swift/WeatherCondition.swift +1 -1
  190. package/nitrogen/generated/ios/swift/WheelchairUse.swift +1 -1
  191. package/nitrogen/generated/ios/swift/WorkoutActivity.swift +9 -34
  192. package/nitrogen/generated/ios/swift/WorkoutActivityType.swift +1 -1
  193. package/nitrogen/generated/ios/swift/WorkoutConfiguration.swift +5 -24
  194. package/nitrogen/generated/ios/swift/WorkoutDurationPredicate.swift +5 -18
  195. package/nitrogen/generated/ios/swift/WorkoutEvent.swift +7 -26
  196. package/nitrogen/generated/ios/swift/WorkoutEventType.swift +1 -1
  197. package/nitrogen/generated/ios/swift/WorkoutPlan.swift +5 -18
  198. package/nitrogen/generated/ios/swift/WorkoutQueryOptions.swift +14 -45
  199. package/nitrogen/generated/ios/swift/WorkoutQueryOptionsWithAnchor.swift +14 -45
  200. package/nitrogen/generated/ios/swift/WorkoutRoute.swift +21 -51
  201. package/nitrogen/generated/ios/swift/WorkoutRouteLocation.swift +28 -88
  202. package/nitrogen/generated/ios/swift/WorkoutSample.swift +211 -646
  203. package/nitrogen/generated/ios/swift/WorkoutSessionLocationType.swift +1 -1
  204. package/nitrogen/generated/ios/swift/WorkoutTotals.swift +19 -30
  205. package/nitrogen/generated/shared/c++/AggregationStyle.hpp +1 -1
  206. package/nitrogen/generated/shared/c++/AuthDataTypes.hpp +16 -8
  207. package/nitrogen/generated/shared/c++/AuthorizationRequestStatus.hpp +1 -1
  208. package/nitrogen/generated/shared/c++/AuthorizationStatus.hpp +1 -1
  209. package/nitrogen/generated/shared/c++/BiologicalSex.hpp +1 -1
  210. package/nitrogen/generated/shared/c++/BloodType.hpp +1 -1
  211. package/nitrogen/generated/shared/c++/CategorySample.hpp +100 -92
  212. package/nitrogen/generated/shared/c++/CategorySampleForSaving.hpp +28 -20
  213. package/nitrogen/generated/shared/c++/CategorySamplesWithAnchorResponse.hpp +19 -11
  214. package/nitrogen/generated/shared/c++/CategoryTypeIdentifier.hpp +1 -1
  215. package/nitrogen/generated/shared/c++/ComparisonPredicateOperator.hpp +1 -1
  216. package/nitrogen/generated/shared/c++/CorrelationSample.hpp +103 -95
  217. package/nitrogen/generated/shared/c++/CorrelationTypeIdentifier.hpp +1 -1
  218. package/nitrogen/generated/shared/c++/DateFilter.hpp +22 -14
  219. package/nitrogen/generated/shared/c++/DeletedSample.hpp +16 -8
  220. package/nitrogen/generated/shared/c++/Device.hpp +34 -26
  221. package/nitrogen/generated/shared/c++/ECGQueryOptionsWithAnchor.hpp +22 -14
  222. package/nitrogen/generated/shared/c++/ECGQueryOptionsWithSortOrder.hpp +22 -14
  223. package/nitrogen/generated/shared/c++/ElectrocardiogramClassification.hpp +1 -1
  224. package/nitrogen/generated/shared/c++/ElectrocardiogramLead.hpp +1 -1
  225. package/nitrogen/generated/shared/c++/ElectrocardiogramSample.hpp +112 -104
  226. package/nitrogen/generated/shared/c++/ElectrocardiogramSamplesWithAnchorResponse.hpp +19 -11
  227. package/nitrogen/generated/shared/c++/ElectrocardiogramSymptomsStatus.hpp +1 -1
  228. package/nitrogen/generated/shared/c++/ElectrocardiogramVoltage.hpp +19 -11
  229. package/nitrogen/generated/shared/c++/FilterForSamples.hpp +44 -36
  230. package/nitrogen/generated/shared/c++/FilterForSamplesBase.hpp +28 -20
  231. package/nitrogen/generated/shared/c++/FilterForWorkouts.hpp +40 -32
  232. package/nitrogen/generated/shared/c++/FilterForWorkoutsBase.hpp +31 -23
  233. package/nitrogen/generated/shared/c++/FitzpatrickSkinType.hpp +1 -1
  234. package/nitrogen/generated/shared/c++/GeneralForm.hpp +1 -1
  235. package/nitrogen/generated/shared/c++/HeartRateMotionContext.hpp +1 -1
  236. package/nitrogen/generated/shared/c++/Heartbeat.hpp +16 -8
  237. package/nitrogen/generated/shared/c++/HeartbeatSeriesSample.hpp +97 -89
  238. package/nitrogen/generated/shared/c++/HeartbeatSeriesSamplesWithAnchorResponse.hpp +19 -11
  239. package/nitrogen/generated/shared/c++/HybridCategoryTypeModuleSpec.cpp +1 -1
  240. package/nitrogen/generated/shared/c++/HybridCategoryTypeModuleSpec.hpp +1 -1
  241. package/nitrogen/generated/shared/c++/HybridCharacteristicTypeModuleSpec.cpp +1 -1
  242. package/nitrogen/generated/shared/c++/HybridCharacteristicTypeModuleSpec.hpp +1 -1
  243. package/nitrogen/generated/shared/c++/HybridCoreModuleSpec.cpp +1 -1
  244. package/nitrogen/generated/shared/c++/HybridCoreModuleSpec.hpp +1 -1
  245. package/nitrogen/generated/shared/c++/HybridCorrelationTypeModuleSpec.cpp +1 -1
  246. package/nitrogen/generated/shared/c++/HybridCorrelationTypeModuleSpec.hpp +1 -1
  247. package/nitrogen/generated/shared/c++/HybridElectrocardiogramModuleSpec.cpp +1 -1
  248. package/nitrogen/generated/shared/c++/HybridElectrocardiogramModuleSpec.hpp +1 -1
  249. package/nitrogen/generated/shared/c++/HybridHeartbeatSeriesModuleSpec.cpp +1 -1
  250. package/nitrogen/generated/shared/c++/HybridHeartbeatSeriesModuleSpec.hpp +1 -1
  251. package/nitrogen/generated/shared/c++/HybridMedicationModuleSpec.cpp +1 -1
  252. package/nitrogen/generated/shared/c++/HybridMedicationModuleSpec.hpp +1 -1
  253. package/nitrogen/generated/shared/c++/HybridQuantityTypeModuleSpec.cpp +1 -1
  254. package/nitrogen/generated/shared/c++/HybridQuantityTypeModuleSpec.hpp +5 -2
  255. package/nitrogen/generated/shared/c++/HybridSourceProxySpec.cpp +1 -1
  256. package/nitrogen/generated/shared/c++/HybridSourceProxySpec.hpp +1 -1
  257. package/nitrogen/generated/shared/c++/HybridStateOfMindModuleSpec.cpp +1 -1
  258. package/nitrogen/generated/shared/c++/HybridStateOfMindModuleSpec.hpp +1 -1
  259. package/nitrogen/generated/shared/c++/HybridWorkoutProxySpec.cpp +1 -1
  260. package/nitrogen/generated/shared/c++/HybridWorkoutProxySpec.hpp +1 -1
  261. package/nitrogen/generated/shared/c++/HybridWorkoutsModuleSpec.cpp +1 -1
  262. package/nitrogen/generated/shared/c++/HybridWorkoutsModuleSpec.hpp +1 -1
  263. package/nitrogen/generated/shared/c++/IdentifierWithUnit.hpp +16 -8
  264. package/nitrogen/generated/shared/c++/InsulinDeliveryReason.hpp +1 -1
  265. package/nitrogen/generated/shared/c++/IntervalComponents.hpp +25 -17
  266. package/nitrogen/generated/shared/c++/LocationForSaving.hpp +34 -26
  267. package/nitrogen/generated/shared/c++/MedicationConcept.hpp +22 -14
  268. package/nitrogen/generated/shared/c++/MedicationDoseEvent.hpp +118 -110
  269. package/nitrogen/generated/shared/c++/MedicationDoseEventLogStatus.hpp +1 -1
  270. package/nitrogen/generated/shared/c++/MedicationDoseEventScheduleType.hpp +1 -1
  271. package/nitrogen/generated/shared/c++/MedicationDoseEventsWithAnchorResponse.hpp +19 -11
  272. package/nitrogen/generated/shared/c++/ObjectTypeIdentifier.hpp +1 -1
  273. package/nitrogen/generated/shared/c++/OnChangeCallbackArgs.hpp +16 -8
  274. package/nitrogen/generated/shared/c++/PerObjectTypeIdentifier.hpp +1 -1
  275. package/nitrogen/generated/shared/c++/PredicateWithMetadataKey.hpp +19 -11
  276. package/nitrogen/generated/shared/c++/Quantity.hpp +16 -8
  277. package/nitrogen/generated/shared/c++/QuantityDateInterval.hpp +16 -8
  278. package/nitrogen/generated/shared/c++/QuantitySample.hpp +103 -95
  279. package/nitrogen/generated/shared/c++/QuantitySampleForSaving.hpp +31 -23
  280. package/nitrogen/generated/shared/c++/QuantitySamplesWithAnchorResponse.hpp +19 -11
  281. package/nitrogen/generated/shared/c++/QuantityTypeIdentifier.hpp +1 -1
  282. package/nitrogen/generated/shared/c++/QuantityTypeIdentifierWriteable.hpp +532 -0
  283. package/nitrogen/generated/shared/c++/QueryCorrelationSamplesWithAnchorResponse.hpp +19 -11
  284. package/nitrogen/generated/shared/c++/QueryOptionsWithAnchor.hpp +19 -11
  285. package/nitrogen/generated/shared/c++/QueryOptionsWithAnchorAndUnit.hpp +22 -14
  286. package/nitrogen/generated/shared/c++/QueryOptionsWithSortOrder.hpp +19 -11
  287. package/nitrogen/generated/shared/c++/QueryOptionsWithSortOrderAndUnit.hpp +22 -14
  288. package/nitrogen/generated/shared/c++/QueryStatisticsResponse.hpp +40 -32
  289. package/nitrogen/generated/shared/c++/QueryStatisticsResponseFromSingleSource.hpp +40 -32
  290. package/nitrogen/generated/shared/c++/QueryWorkoutSamplesWithAnchorResponse.hpp +19 -11
  291. package/nitrogen/generated/shared/c++/RelatedCoding.hpp +19 -11
  292. package/nitrogen/generated/shared/c++/SampleType.hpp +22 -14
  293. package/nitrogen/generated/shared/c++/SampleTypeIdentifier.hpp +1 -1
  294. package/nitrogen/generated/shared/c++/SampleTypeIdentifierWriteable.hpp +1 -1
  295. package/nitrogen/generated/shared/c++/Source.hpp +16 -8
  296. package/nitrogen/generated/shared/c++/SourceRevision.hpp +22 -14
  297. package/nitrogen/generated/shared/c++/StateOfMindAssociation.hpp +1 -1
  298. package/nitrogen/generated/shared/c++/StateOfMindKind.hpp +1 -1
  299. package/nitrogen/generated/shared/c++/StateOfMindLabel.hpp +1 -1
  300. package/nitrogen/generated/shared/c++/StateOfMindSample.hpp +109 -101
  301. package/nitrogen/generated/shared/c++/StateOfMindSamplesWithAnchorResponse.hpp +19 -11
  302. package/nitrogen/generated/shared/c++/StateOfMindValenceClassification.hpp +1 -1
  303. package/nitrogen/generated/shared/c++/StatisticsOptions.hpp +1 -1
  304. package/nitrogen/generated/shared/c++/StatisticsQueryOptions.hpp +16 -8
  305. package/nitrogen/generated/shared/c++/UpdateFrequency.hpp +1 -1
  306. package/nitrogen/generated/shared/c++/UserAnnotatedMedication.hpp +22 -14
  307. package/nitrogen/generated/shared/c++/WeatherCondition.hpp +1 -1
  308. package/nitrogen/generated/shared/c++/WheelchairUse.hpp +1 -1
  309. package/nitrogen/generated/shared/c++/WorkoutActivity.hpp +22 -14
  310. package/nitrogen/generated/shared/c++/WorkoutActivityType.hpp +1 -1
  311. package/nitrogen/generated/shared/c++/WorkoutConfiguration.hpp +16 -8
  312. package/nitrogen/generated/shared/c++/WorkoutDurationPredicate.hpp +16 -8
  313. package/nitrogen/generated/shared/c++/WorkoutEvent.hpp +19 -11
  314. package/nitrogen/generated/shared/c++/WorkoutEventType.hpp +1 -1
  315. package/nitrogen/generated/shared/c++/WorkoutPlan.hpp +16 -8
  316. package/nitrogen/generated/shared/c++/WorkoutQueryOptions.hpp +19 -11
  317. package/nitrogen/generated/shared/c++/WorkoutQueryOptionsWithAnchor.hpp +19 -11
  318. package/nitrogen/generated/shared/c++/WorkoutRoute.hpp +19 -11
  319. package/nitrogen/generated/shared/c++/WorkoutRouteLocation.hpp +40 -32
  320. package/nitrogen/generated/shared/c++/WorkoutSample.hpp +136 -128
  321. package/nitrogen/generated/shared/c++/WorkoutSessionLocationType.hpp +1 -1
  322. package/nitrogen/generated/shared/c++/WorkoutTotals.hpp +16 -8
  323. package/package.json +4 -4
  324. package/src/specs/CoreModule.nitro.ts +1 -1
  325. package/src/specs/QuantityTypeModule.nitro.ts +5 -2
  326. package/src/types/QuantityType.ts +1 -1
  327. package/src/types/QueryOptions.ts +5 -4
  328. package/src/types/Workouts.ts +3 -3
@@ -2,7 +2,7 @@
2
2
  /// WorkoutRouteLocation.hpp
3
3
  /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
4
  /// https://github.com/mrousavy/nitro
5
- /// Copyright © 2026 Marc Rousavy @ Margelo
5
+ /// Copyright © Marc Rousavy @ Margelo
6
6
  ///
7
7
 
8
8
  #pragma once
@@ -22,6 +22,11 @@
22
22
  #else
23
23
  #error NitroModules cannot be found! Are you sure you installed NitroModules properly?
24
24
  #endif
25
+ #if __has_include(<NitroModules/PropNameIDCache.hpp>)
26
+ #include <NitroModules/PropNameIDCache.hpp>
27
+ #else
28
+ #error NitroModules cannot be found! Are you sure you installed NitroModules properly?
29
+ #endif
25
30
 
26
31
 
27
32
 
@@ -33,7 +38,7 @@ namespace margelo::nitro::healthkit {
33
38
  /**
34
39
  * A struct which can be represented as a JavaScript object (WorkoutRouteLocation).
35
40
  */
36
- struct WorkoutRouteLocation {
41
+ struct WorkoutRouteLocation final {
37
42
  public:
38
43
  double altitude SWIFT_PRIVATE;
39
44
  double course SWIFT_PRIVATE;
@@ -49,6 +54,9 @@ namespace margelo::nitro::healthkit {
49
54
  public:
50
55
  WorkoutRouteLocation() = default;
51
56
  explicit WorkoutRouteLocation(double altitude, double course, std::chrono::system_clock::time_point date, std::optional<double> distance, double horizontalAccuracy, double latitude, double longitude, double speed, double speedAccuracy, double verticalAccuracy): altitude(altitude), course(course), date(date), distance(distance), horizontalAccuracy(horizontalAccuracy), latitude(latitude), longitude(longitude), speed(speed), speedAccuracy(speedAccuracy), verticalAccuracy(verticalAccuracy) {}
57
+
58
+ public:
59
+ friend bool operator==(const WorkoutRouteLocation& lhs, const WorkoutRouteLocation& rhs) = default;
52
60
  };
53
61
 
54
62
  } // namespace margelo::nitro::healthkit
@@ -61,30 +69,30 @@ namespace margelo::nitro {
61
69
  static inline margelo::nitro::healthkit::WorkoutRouteLocation fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
62
70
  jsi::Object obj = arg.asObject(runtime);
63
71
  return margelo::nitro::healthkit::WorkoutRouteLocation(
64
- JSIConverter<double>::fromJSI(runtime, obj.getProperty(runtime, "altitude")),
65
- JSIConverter<double>::fromJSI(runtime, obj.getProperty(runtime, "course")),
66
- JSIConverter<std::chrono::system_clock::time_point>::fromJSI(runtime, obj.getProperty(runtime, "date")),
67
- JSIConverter<std::optional<double>>::fromJSI(runtime, obj.getProperty(runtime, "distance")),
68
- JSIConverter<double>::fromJSI(runtime, obj.getProperty(runtime, "horizontalAccuracy")),
69
- JSIConverter<double>::fromJSI(runtime, obj.getProperty(runtime, "latitude")),
70
- JSIConverter<double>::fromJSI(runtime, obj.getProperty(runtime, "longitude")),
71
- JSIConverter<double>::fromJSI(runtime, obj.getProperty(runtime, "speed")),
72
- JSIConverter<double>::fromJSI(runtime, obj.getProperty(runtime, "speedAccuracy")),
73
- JSIConverter<double>::fromJSI(runtime, obj.getProperty(runtime, "verticalAccuracy"))
72
+ JSIConverter<double>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "altitude"))),
73
+ JSIConverter<double>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "course"))),
74
+ JSIConverter<std::chrono::system_clock::time_point>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "date"))),
75
+ JSIConverter<std::optional<double>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "distance"))),
76
+ JSIConverter<double>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "horizontalAccuracy"))),
77
+ JSIConverter<double>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "latitude"))),
78
+ JSIConverter<double>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "longitude"))),
79
+ JSIConverter<double>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "speed"))),
80
+ JSIConverter<double>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "speedAccuracy"))),
81
+ JSIConverter<double>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "verticalAccuracy")))
74
82
  );
75
83
  }
76
84
  static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::healthkit::WorkoutRouteLocation& arg) {
77
85
  jsi::Object obj(runtime);
78
- obj.setProperty(runtime, "altitude", JSIConverter<double>::toJSI(runtime, arg.altitude));
79
- obj.setProperty(runtime, "course", JSIConverter<double>::toJSI(runtime, arg.course));
80
- obj.setProperty(runtime, "date", JSIConverter<std::chrono::system_clock::time_point>::toJSI(runtime, arg.date));
81
- obj.setProperty(runtime, "distance", JSIConverter<std::optional<double>>::toJSI(runtime, arg.distance));
82
- obj.setProperty(runtime, "horizontalAccuracy", JSIConverter<double>::toJSI(runtime, arg.horizontalAccuracy));
83
- obj.setProperty(runtime, "latitude", JSIConverter<double>::toJSI(runtime, arg.latitude));
84
- obj.setProperty(runtime, "longitude", JSIConverter<double>::toJSI(runtime, arg.longitude));
85
- obj.setProperty(runtime, "speed", JSIConverter<double>::toJSI(runtime, arg.speed));
86
- obj.setProperty(runtime, "speedAccuracy", JSIConverter<double>::toJSI(runtime, arg.speedAccuracy));
87
- obj.setProperty(runtime, "verticalAccuracy", JSIConverter<double>::toJSI(runtime, arg.verticalAccuracy));
86
+ obj.setProperty(runtime, PropNameIDCache::get(runtime, "altitude"), JSIConverter<double>::toJSI(runtime, arg.altitude));
87
+ obj.setProperty(runtime, PropNameIDCache::get(runtime, "course"), JSIConverter<double>::toJSI(runtime, arg.course));
88
+ obj.setProperty(runtime, PropNameIDCache::get(runtime, "date"), JSIConverter<std::chrono::system_clock::time_point>::toJSI(runtime, arg.date));
89
+ obj.setProperty(runtime, PropNameIDCache::get(runtime, "distance"), JSIConverter<std::optional<double>>::toJSI(runtime, arg.distance));
90
+ obj.setProperty(runtime, PropNameIDCache::get(runtime, "horizontalAccuracy"), JSIConverter<double>::toJSI(runtime, arg.horizontalAccuracy));
91
+ obj.setProperty(runtime, PropNameIDCache::get(runtime, "latitude"), JSIConverter<double>::toJSI(runtime, arg.latitude));
92
+ obj.setProperty(runtime, PropNameIDCache::get(runtime, "longitude"), JSIConverter<double>::toJSI(runtime, arg.longitude));
93
+ obj.setProperty(runtime, PropNameIDCache::get(runtime, "speed"), JSIConverter<double>::toJSI(runtime, arg.speed));
94
+ obj.setProperty(runtime, PropNameIDCache::get(runtime, "speedAccuracy"), JSIConverter<double>::toJSI(runtime, arg.speedAccuracy));
95
+ obj.setProperty(runtime, PropNameIDCache::get(runtime, "verticalAccuracy"), JSIConverter<double>::toJSI(runtime, arg.verticalAccuracy));
88
96
  return obj;
89
97
  }
90
98
  static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
@@ -95,16 +103,16 @@ namespace margelo::nitro {
95
103
  if (!nitro::isPlainObject(runtime, obj)) {
96
104
  return false;
97
105
  }
98
- if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, "altitude"))) return false;
99
- if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, "course"))) return false;
100
- if (!JSIConverter<std::chrono::system_clock::time_point>::canConvert(runtime, obj.getProperty(runtime, "date"))) return false;
101
- if (!JSIConverter<std::optional<double>>::canConvert(runtime, obj.getProperty(runtime, "distance"))) return false;
102
- if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, "horizontalAccuracy"))) return false;
103
- if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, "latitude"))) return false;
104
- if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, "longitude"))) return false;
105
- if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, "speed"))) return false;
106
- if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, "speedAccuracy"))) return false;
107
- if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, "verticalAccuracy"))) return false;
106
+ if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "altitude")))) return false;
107
+ if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "course")))) return false;
108
+ if (!JSIConverter<std::chrono::system_clock::time_point>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "date")))) return false;
109
+ if (!JSIConverter<std::optional<double>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "distance")))) return false;
110
+ if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "horizontalAccuracy")))) return false;
111
+ if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "latitude")))) return false;
112
+ if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "longitude")))) return false;
113
+ if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "speed")))) return false;
114
+ if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "speedAccuracy")))) return false;
115
+ if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "verticalAccuracy")))) return false;
108
116
  return true;
109
117
  }
110
118
  };
@@ -2,7 +2,7 @@
2
2
  /// WorkoutSample.hpp
3
3
  /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
4
  /// https://github.com/mrousavy/nitro
5
- /// Copyright © 2026 Marc Rousavy @ Margelo
5
+ /// Copyright © Marc Rousavy @ Margelo
6
6
  ///
7
7
 
8
8
  #pragma once
@@ -22,6 +22,11 @@
22
22
  #else
23
23
  #error NitroModules cannot be found! Are you sure you installed NitroModules properly?
24
24
  #endif
25
+ #if __has_include(<NitroModules/PropNameIDCache.hpp>)
26
+ #include <NitroModules/PropNameIDCache.hpp>
27
+ #else
28
+ #error NitroModules cannot be found! Are you sure you installed NitroModules properly?
29
+ #endif
25
30
 
26
31
  // Forward declaration of `WorkoutActivityType` to properly resolve imports.
27
32
  namespace margelo::nitro::healthkit { enum class WorkoutActivityType; }
@@ -65,7 +70,7 @@ namespace margelo::nitro::healthkit {
65
70
  /**
66
71
  * A struct which can be represented as a JavaScript object (WorkoutSample).
67
72
  */
68
- struct WorkoutSample {
73
+ struct WorkoutSample final {
69
74
  public:
70
75
  WorkoutActivityType workoutActivityType SWIFT_PRIVATE;
71
76
  Quantity duration SWIFT_PRIVATE;
@@ -113,6 +118,9 @@ namespace margelo::nitro::healthkit {
113
118
  public:
114
119
  WorkoutSample() = default;
115
120
  explicit WorkoutSample(WorkoutActivityType workoutActivityType, Quantity duration, std::optional<Quantity> totalEnergyBurned, std::optional<Quantity> totalDistance, std::optional<Quantity> totalSwimmingStrokeCount, std::optional<Quantity> totalFlightsClimbed, std::optional<std::vector<WorkoutEvent>> events, std::optional<std::vector<WorkoutActivity>> activities, std::optional<Quantity> metadataAverageMETs, std::optional<Quantity> metadataElevationAscended, std::optional<Quantity> metadataElevationDescended, std::optional<bool> metadataIndoorWorkout, std::optional<Quantity> metadataAverageSpeed, std::optional<Quantity> metadataMaximumSpeed, SampleType sampleType, std::chrono::system_clock::time_point startDate, std::chrono::system_clock::time_point endDate, bool hasUndeterminedDuration, std::optional<WeatherCondition> metadataWeatherCondition, std::optional<Quantity> metadataWeatherHumidity, std::optional<Quantity> metadataWeatherTemperature, std::optional<InsulinDeliveryReason> metadataInsulinDeliveryReason, std::optional<HeartRateMotionContext> metadataHeartRateMotionContext, std::string uuid, SourceRevision sourceRevision, std::optional<Device> device, std::shared_ptr<AnyMap> metadata, std::optional<std::string> metadataExternalUUID, std::optional<std::string> metadataTimeZone, std::optional<bool> metadataWasUserEntered, std::optional<std::string> metadataDeviceSerialNumber, std::optional<std::string> metadataUdiDeviceIdentifier, std::optional<std::string> metadataUdiProductionIdentifier, std::optional<std::string> metadataDigitalSignature, std::optional<std::string> metadataDeviceName, std::optional<std::string> metadataDeviceManufacturerName, std::optional<std::string> metadataSyncIdentifier, std::optional<double> metadataSyncVersion, std::optional<bool> metadataWasTakenInLab, std::optional<double> metadataReferenceRangeLowerLimit, std::optional<double> metadataReferenceRangeUpperLimit, std::optional<double> metadataAlgorithmVersion): workoutActivityType(workoutActivityType), duration(duration), totalEnergyBurned(totalEnergyBurned), totalDistance(totalDistance), totalSwimmingStrokeCount(totalSwimmingStrokeCount), totalFlightsClimbed(totalFlightsClimbed), events(events), activities(activities), metadataAverageMETs(metadataAverageMETs), metadataElevationAscended(metadataElevationAscended), metadataElevationDescended(metadataElevationDescended), metadataIndoorWorkout(metadataIndoorWorkout), metadataAverageSpeed(metadataAverageSpeed), metadataMaximumSpeed(metadataMaximumSpeed), sampleType(sampleType), startDate(startDate), endDate(endDate), hasUndeterminedDuration(hasUndeterminedDuration), metadataWeatherCondition(metadataWeatherCondition), metadataWeatherHumidity(metadataWeatherHumidity), metadataWeatherTemperature(metadataWeatherTemperature), metadataInsulinDeliveryReason(metadataInsulinDeliveryReason), metadataHeartRateMotionContext(metadataHeartRateMotionContext), uuid(uuid), sourceRevision(sourceRevision), device(device), metadata(metadata), metadataExternalUUID(metadataExternalUUID), metadataTimeZone(metadataTimeZone), metadataWasUserEntered(metadataWasUserEntered), metadataDeviceSerialNumber(metadataDeviceSerialNumber), metadataUdiDeviceIdentifier(metadataUdiDeviceIdentifier), metadataUdiProductionIdentifier(metadataUdiProductionIdentifier), metadataDigitalSignature(metadataDigitalSignature), metadataDeviceName(metadataDeviceName), metadataDeviceManufacturerName(metadataDeviceManufacturerName), metadataSyncIdentifier(metadataSyncIdentifier), metadataSyncVersion(metadataSyncVersion), metadataWasTakenInLab(metadataWasTakenInLab), metadataReferenceRangeLowerLimit(metadataReferenceRangeLowerLimit), metadataReferenceRangeUpperLimit(metadataReferenceRangeUpperLimit), metadataAlgorithmVersion(metadataAlgorithmVersion) {}
121
+
122
+ public:
123
+ friend bool operator==(const WorkoutSample& lhs, const WorkoutSample& rhs) = default;
116
124
  };
117
125
 
118
126
  } // namespace margelo::nitro::healthkit
@@ -125,94 +133,94 @@ namespace margelo::nitro {
125
133
  static inline margelo::nitro::healthkit::WorkoutSample fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
126
134
  jsi::Object obj = arg.asObject(runtime);
127
135
  return margelo::nitro::healthkit::WorkoutSample(
128
- JSIConverter<margelo::nitro::healthkit::WorkoutActivityType>::fromJSI(runtime, obj.getProperty(runtime, "workoutActivityType")),
129
- JSIConverter<margelo::nitro::healthkit::Quantity>::fromJSI(runtime, obj.getProperty(runtime, "duration")),
130
- JSIConverter<std::optional<margelo::nitro::healthkit::Quantity>>::fromJSI(runtime, obj.getProperty(runtime, "totalEnergyBurned")),
131
- JSIConverter<std::optional<margelo::nitro::healthkit::Quantity>>::fromJSI(runtime, obj.getProperty(runtime, "totalDistance")),
132
- JSIConverter<std::optional<margelo::nitro::healthkit::Quantity>>::fromJSI(runtime, obj.getProperty(runtime, "totalSwimmingStrokeCount")),
133
- JSIConverter<std::optional<margelo::nitro::healthkit::Quantity>>::fromJSI(runtime, obj.getProperty(runtime, "totalFlightsClimbed")),
134
- JSIConverter<std::optional<std::vector<margelo::nitro::healthkit::WorkoutEvent>>>::fromJSI(runtime, obj.getProperty(runtime, "events")),
135
- JSIConverter<std::optional<std::vector<margelo::nitro::healthkit::WorkoutActivity>>>::fromJSI(runtime, obj.getProperty(runtime, "activities")),
136
- JSIConverter<std::optional<margelo::nitro::healthkit::Quantity>>::fromJSI(runtime, obj.getProperty(runtime, "metadataAverageMETs")),
137
- JSIConverter<std::optional<margelo::nitro::healthkit::Quantity>>::fromJSI(runtime, obj.getProperty(runtime, "metadataElevationAscended")),
138
- JSIConverter<std::optional<margelo::nitro::healthkit::Quantity>>::fromJSI(runtime, obj.getProperty(runtime, "metadataElevationDescended")),
139
- JSIConverter<std::optional<bool>>::fromJSI(runtime, obj.getProperty(runtime, "metadataIndoorWorkout")),
140
- JSIConverter<std::optional<margelo::nitro::healthkit::Quantity>>::fromJSI(runtime, obj.getProperty(runtime, "metadataAverageSpeed")),
141
- JSIConverter<std::optional<margelo::nitro::healthkit::Quantity>>::fromJSI(runtime, obj.getProperty(runtime, "metadataMaximumSpeed")),
142
- JSIConverter<margelo::nitro::healthkit::SampleType>::fromJSI(runtime, obj.getProperty(runtime, "sampleType")),
143
- JSIConverter<std::chrono::system_clock::time_point>::fromJSI(runtime, obj.getProperty(runtime, "startDate")),
144
- JSIConverter<std::chrono::system_clock::time_point>::fromJSI(runtime, obj.getProperty(runtime, "endDate")),
145
- JSIConverter<bool>::fromJSI(runtime, obj.getProperty(runtime, "hasUndeterminedDuration")),
146
- JSIConverter<std::optional<margelo::nitro::healthkit::WeatherCondition>>::fromJSI(runtime, obj.getProperty(runtime, "metadataWeatherCondition")),
147
- JSIConverter<std::optional<margelo::nitro::healthkit::Quantity>>::fromJSI(runtime, obj.getProperty(runtime, "metadataWeatherHumidity")),
148
- JSIConverter<std::optional<margelo::nitro::healthkit::Quantity>>::fromJSI(runtime, obj.getProperty(runtime, "metadataWeatherTemperature")),
149
- JSIConverter<std::optional<margelo::nitro::healthkit::InsulinDeliveryReason>>::fromJSI(runtime, obj.getProperty(runtime, "metadataInsulinDeliveryReason")),
150
- JSIConverter<std::optional<margelo::nitro::healthkit::HeartRateMotionContext>>::fromJSI(runtime, obj.getProperty(runtime, "metadataHeartRateMotionContext")),
151
- JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "uuid")),
152
- JSIConverter<margelo::nitro::healthkit::SourceRevision>::fromJSI(runtime, obj.getProperty(runtime, "sourceRevision")),
153
- JSIConverter<std::optional<margelo::nitro::healthkit::Device>>::fromJSI(runtime, obj.getProperty(runtime, "device")),
154
- JSIConverter<std::shared_ptr<AnyMap>>::fromJSI(runtime, obj.getProperty(runtime, "metadata")),
155
- JSIConverter<std::optional<std::string>>::fromJSI(runtime, obj.getProperty(runtime, "metadataExternalUUID")),
156
- JSIConverter<std::optional<std::string>>::fromJSI(runtime, obj.getProperty(runtime, "metadataTimeZone")),
157
- JSIConverter<std::optional<bool>>::fromJSI(runtime, obj.getProperty(runtime, "metadataWasUserEntered")),
158
- JSIConverter<std::optional<std::string>>::fromJSI(runtime, obj.getProperty(runtime, "metadataDeviceSerialNumber")),
159
- JSIConverter<std::optional<std::string>>::fromJSI(runtime, obj.getProperty(runtime, "metadataUdiDeviceIdentifier")),
160
- JSIConverter<std::optional<std::string>>::fromJSI(runtime, obj.getProperty(runtime, "metadataUdiProductionIdentifier")),
161
- JSIConverter<std::optional<std::string>>::fromJSI(runtime, obj.getProperty(runtime, "metadataDigitalSignature")),
162
- JSIConverter<std::optional<std::string>>::fromJSI(runtime, obj.getProperty(runtime, "metadataDeviceName")),
163
- JSIConverter<std::optional<std::string>>::fromJSI(runtime, obj.getProperty(runtime, "metadataDeviceManufacturerName")),
164
- JSIConverter<std::optional<std::string>>::fromJSI(runtime, obj.getProperty(runtime, "metadataSyncIdentifier")),
165
- JSIConverter<std::optional<double>>::fromJSI(runtime, obj.getProperty(runtime, "metadataSyncVersion")),
166
- JSIConverter<std::optional<bool>>::fromJSI(runtime, obj.getProperty(runtime, "metadataWasTakenInLab")),
167
- JSIConverter<std::optional<double>>::fromJSI(runtime, obj.getProperty(runtime, "metadataReferenceRangeLowerLimit")),
168
- JSIConverter<std::optional<double>>::fromJSI(runtime, obj.getProperty(runtime, "metadataReferenceRangeUpperLimit")),
169
- JSIConverter<std::optional<double>>::fromJSI(runtime, obj.getProperty(runtime, "metadataAlgorithmVersion"))
136
+ JSIConverter<margelo::nitro::healthkit::WorkoutActivityType>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "workoutActivityType"))),
137
+ JSIConverter<margelo::nitro::healthkit::Quantity>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "duration"))),
138
+ JSIConverter<std::optional<margelo::nitro::healthkit::Quantity>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "totalEnergyBurned"))),
139
+ JSIConverter<std::optional<margelo::nitro::healthkit::Quantity>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "totalDistance"))),
140
+ JSIConverter<std::optional<margelo::nitro::healthkit::Quantity>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "totalSwimmingStrokeCount"))),
141
+ JSIConverter<std::optional<margelo::nitro::healthkit::Quantity>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "totalFlightsClimbed"))),
142
+ JSIConverter<std::optional<std::vector<margelo::nitro::healthkit::WorkoutEvent>>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "events"))),
143
+ JSIConverter<std::optional<std::vector<margelo::nitro::healthkit::WorkoutActivity>>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "activities"))),
144
+ JSIConverter<std::optional<margelo::nitro::healthkit::Quantity>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "metadataAverageMETs"))),
145
+ JSIConverter<std::optional<margelo::nitro::healthkit::Quantity>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "metadataElevationAscended"))),
146
+ JSIConverter<std::optional<margelo::nitro::healthkit::Quantity>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "metadataElevationDescended"))),
147
+ JSIConverter<std::optional<bool>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "metadataIndoorWorkout"))),
148
+ JSIConverter<std::optional<margelo::nitro::healthkit::Quantity>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "metadataAverageSpeed"))),
149
+ JSIConverter<std::optional<margelo::nitro::healthkit::Quantity>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "metadataMaximumSpeed"))),
150
+ JSIConverter<margelo::nitro::healthkit::SampleType>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "sampleType"))),
151
+ JSIConverter<std::chrono::system_clock::time_point>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "startDate"))),
152
+ JSIConverter<std::chrono::system_clock::time_point>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "endDate"))),
153
+ JSIConverter<bool>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "hasUndeterminedDuration"))),
154
+ JSIConverter<std::optional<margelo::nitro::healthkit::WeatherCondition>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "metadataWeatherCondition"))),
155
+ JSIConverter<std::optional<margelo::nitro::healthkit::Quantity>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "metadataWeatherHumidity"))),
156
+ JSIConverter<std::optional<margelo::nitro::healthkit::Quantity>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "metadataWeatherTemperature"))),
157
+ JSIConverter<std::optional<margelo::nitro::healthkit::InsulinDeliveryReason>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "metadataInsulinDeliveryReason"))),
158
+ JSIConverter<std::optional<margelo::nitro::healthkit::HeartRateMotionContext>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "metadataHeartRateMotionContext"))),
159
+ JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "uuid"))),
160
+ JSIConverter<margelo::nitro::healthkit::SourceRevision>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "sourceRevision"))),
161
+ JSIConverter<std::optional<margelo::nitro::healthkit::Device>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "device"))),
162
+ JSIConverter<std::shared_ptr<AnyMap>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "metadata"))),
163
+ JSIConverter<std::optional<std::string>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "metadataExternalUUID"))),
164
+ JSIConverter<std::optional<std::string>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "metadataTimeZone"))),
165
+ JSIConverter<std::optional<bool>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "metadataWasUserEntered"))),
166
+ JSIConverter<std::optional<std::string>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "metadataDeviceSerialNumber"))),
167
+ JSIConverter<std::optional<std::string>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "metadataUdiDeviceIdentifier"))),
168
+ JSIConverter<std::optional<std::string>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "metadataUdiProductionIdentifier"))),
169
+ JSIConverter<std::optional<std::string>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "metadataDigitalSignature"))),
170
+ JSIConverter<std::optional<std::string>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "metadataDeviceName"))),
171
+ JSIConverter<std::optional<std::string>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "metadataDeviceManufacturerName"))),
172
+ JSIConverter<std::optional<std::string>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "metadataSyncIdentifier"))),
173
+ JSIConverter<std::optional<double>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "metadataSyncVersion"))),
174
+ JSIConverter<std::optional<bool>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "metadataWasTakenInLab"))),
175
+ JSIConverter<std::optional<double>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "metadataReferenceRangeLowerLimit"))),
176
+ JSIConverter<std::optional<double>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "metadataReferenceRangeUpperLimit"))),
177
+ JSIConverter<std::optional<double>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "metadataAlgorithmVersion")))
170
178
  );
171
179
  }
172
180
  static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::healthkit::WorkoutSample& arg) {
173
181
  jsi::Object obj(runtime);
174
- obj.setProperty(runtime, "workoutActivityType", JSIConverter<margelo::nitro::healthkit::WorkoutActivityType>::toJSI(runtime, arg.workoutActivityType));
175
- obj.setProperty(runtime, "duration", JSIConverter<margelo::nitro::healthkit::Quantity>::toJSI(runtime, arg.duration));
176
- obj.setProperty(runtime, "totalEnergyBurned", JSIConverter<std::optional<margelo::nitro::healthkit::Quantity>>::toJSI(runtime, arg.totalEnergyBurned));
177
- obj.setProperty(runtime, "totalDistance", JSIConverter<std::optional<margelo::nitro::healthkit::Quantity>>::toJSI(runtime, arg.totalDistance));
178
- obj.setProperty(runtime, "totalSwimmingStrokeCount", JSIConverter<std::optional<margelo::nitro::healthkit::Quantity>>::toJSI(runtime, arg.totalSwimmingStrokeCount));
179
- obj.setProperty(runtime, "totalFlightsClimbed", JSIConverter<std::optional<margelo::nitro::healthkit::Quantity>>::toJSI(runtime, arg.totalFlightsClimbed));
180
- obj.setProperty(runtime, "events", JSIConverter<std::optional<std::vector<margelo::nitro::healthkit::WorkoutEvent>>>::toJSI(runtime, arg.events));
181
- obj.setProperty(runtime, "activities", JSIConverter<std::optional<std::vector<margelo::nitro::healthkit::WorkoutActivity>>>::toJSI(runtime, arg.activities));
182
- obj.setProperty(runtime, "metadataAverageMETs", JSIConverter<std::optional<margelo::nitro::healthkit::Quantity>>::toJSI(runtime, arg.metadataAverageMETs));
183
- obj.setProperty(runtime, "metadataElevationAscended", JSIConverter<std::optional<margelo::nitro::healthkit::Quantity>>::toJSI(runtime, arg.metadataElevationAscended));
184
- obj.setProperty(runtime, "metadataElevationDescended", JSIConverter<std::optional<margelo::nitro::healthkit::Quantity>>::toJSI(runtime, arg.metadataElevationDescended));
185
- obj.setProperty(runtime, "metadataIndoorWorkout", JSIConverter<std::optional<bool>>::toJSI(runtime, arg.metadataIndoorWorkout));
186
- obj.setProperty(runtime, "metadataAverageSpeed", JSIConverter<std::optional<margelo::nitro::healthkit::Quantity>>::toJSI(runtime, arg.metadataAverageSpeed));
187
- obj.setProperty(runtime, "metadataMaximumSpeed", JSIConverter<std::optional<margelo::nitro::healthkit::Quantity>>::toJSI(runtime, arg.metadataMaximumSpeed));
188
- obj.setProperty(runtime, "sampleType", JSIConverter<margelo::nitro::healthkit::SampleType>::toJSI(runtime, arg.sampleType));
189
- obj.setProperty(runtime, "startDate", JSIConverter<std::chrono::system_clock::time_point>::toJSI(runtime, arg.startDate));
190
- obj.setProperty(runtime, "endDate", JSIConverter<std::chrono::system_clock::time_point>::toJSI(runtime, arg.endDate));
191
- obj.setProperty(runtime, "hasUndeterminedDuration", JSIConverter<bool>::toJSI(runtime, arg.hasUndeterminedDuration));
192
- obj.setProperty(runtime, "metadataWeatherCondition", JSIConverter<std::optional<margelo::nitro::healthkit::WeatherCondition>>::toJSI(runtime, arg.metadataWeatherCondition));
193
- obj.setProperty(runtime, "metadataWeatherHumidity", JSIConverter<std::optional<margelo::nitro::healthkit::Quantity>>::toJSI(runtime, arg.metadataWeatherHumidity));
194
- obj.setProperty(runtime, "metadataWeatherTemperature", JSIConverter<std::optional<margelo::nitro::healthkit::Quantity>>::toJSI(runtime, arg.metadataWeatherTemperature));
195
- obj.setProperty(runtime, "metadataInsulinDeliveryReason", JSIConverter<std::optional<margelo::nitro::healthkit::InsulinDeliveryReason>>::toJSI(runtime, arg.metadataInsulinDeliveryReason));
196
- obj.setProperty(runtime, "metadataHeartRateMotionContext", JSIConverter<std::optional<margelo::nitro::healthkit::HeartRateMotionContext>>::toJSI(runtime, arg.metadataHeartRateMotionContext));
197
- obj.setProperty(runtime, "uuid", JSIConverter<std::string>::toJSI(runtime, arg.uuid));
198
- obj.setProperty(runtime, "sourceRevision", JSIConverter<margelo::nitro::healthkit::SourceRevision>::toJSI(runtime, arg.sourceRevision));
199
- obj.setProperty(runtime, "device", JSIConverter<std::optional<margelo::nitro::healthkit::Device>>::toJSI(runtime, arg.device));
200
- obj.setProperty(runtime, "metadata", JSIConverter<std::shared_ptr<AnyMap>>::toJSI(runtime, arg.metadata));
201
- obj.setProperty(runtime, "metadataExternalUUID", JSIConverter<std::optional<std::string>>::toJSI(runtime, arg.metadataExternalUUID));
202
- obj.setProperty(runtime, "metadataTimeZone", JSIConverter<std::optional<std::string>>::toJSI(runtime, arg.metadataTimeZone));
203
- obj.setProperty(runtime, "metadataWasUserEntered", JSIConverter<std::optional<bool>>::toJSI(runtime, arg.metadataWasUserEntered));
204
- obj.setProperty(runtime, "metadataDeviceSerialNumber", JSIConverter<std::optional<std::string>>::toJSI(runtime, arg.metadataDeviceSerialNumber));
205
- obj.setProperty(runtime, "metadataUdiDeviceIdentifier", JSIConverter<std::optional<std::string>>::toJSI(runtime, arg.metadataUdiDeviceIdentifier));
206
- obj.setProperty(runtime, "metadataUdiProductionIdentifier", JSIConverter<std::optional<std::string>>::toJSI(runtime, arg.metadataUdiProductionIdentifier));
207
- obj.setProperty(runtime, "metadataDigitalSignature", JSIConverter<std::optional<std::string>>::toJSI(runtime, arg.metadataDigitalSignature));
208
- obj.setProperty(runtime, "metadataDeviceName", JSIConverter<std::optional<std::string>>::toJSI(runtime, arg.metadataDeviceName));
209
- obj.setProperty(runtime, "metadataDeviceManufacturerName", JSIConverter<std::optional<std::string>>::toJSI(runtime, arg.metadataDeviceManufacturerName));
210
- obj.setProperty(runtime, "metadataSyncIdentifier", JSIConverter<std::optional<std::string>>::toJSI(runtime, arg.metadataSyncIdentifier));
211
- obj.setProperty(runtime, "metadataSyncVersion", JSIConverter<std::optional<double>>::toJSI(runtime, arg.metadataSyncVersion));
212
- obj.setProperty(runtime, "metadataWasTakenInLab", JSIConverter<std::optional<bool>>::toJSI(runtime, arg.metadataWasTakenInLab));
213
- obj.setProperty(runtime, "metadataReferenceRangeLowerLimit", JSIConverter<std::optional<double>>::toJSI(runtime, arg.metadataReferenceRangeLowerLimit));
214
- obj.setProperty(runtime, "metadataReferenceRangeUpperLimit", JSIConverter<std::optional<double>>::toJSI(runtime, arg.metadataReferenceRangeUpperLimit));
215
- obj.setProperty(runtime, "metadataAlgorithmVersion", JSIConverter<std::optional<double>>::toJSI(runtime, arg.metadataAlgorithmVersion));
182
+ obj.setProperty(runtime, PropNameIDCache::get(runtime, "workoutActivityType"), JSIConverter<margelo::nitro::healthkit::WorkoutActivityType>::toJSI(runtime, arg.workoutActivityType));
183
+ obj.setProperty(runtime, PropNameIDCache::get(runtime, "duration"), JSIConverter<margelo::nitro::healthkit::Quantity>::toJSI(runtime, arg.duration));
184
+ obj.setProperty(runtime, PropNameIDCache::get(runtime, "totalEnergyBurned"), JSIConverter<std::optional<margelo::nitro::healthkit::Quantity>>::toJSI(runtime, arg.totalEnergyBurned));
185
+ obj.setProperty(runtime, PropNameIDCache::get(runtime, "totalDistance"), JSIConverter<std::optional<margelo::nitro::healthkit::Quantity>>::toJSI(runtime, arg.totalDistance));
186
+ obj.setProperty(runtime, PropNameIDCache::get(runtime, "totalSwimmingStrokeCount"), JSIConverter<std::optional<margelo::nitro::healthkit::Quantity>>::toJSI(runtime, arg.totalSwimmingStrokeCount));
187
+ obj.setProperty(runtime, PropNameIDCache::get(runtime, "totalFlightsClimbed"), JSIConverter<std::optional<margelo::nitro::healthkit::Quantity>>::toJSI(runtime, arg.totalFlightsClimbed));
188
+ obj.setProperty(runtime, PropNameIDCache::get(runtime, "events"), JSIConverter<std::optional<std::vector<margelo::nitro::healthkit::WorkoutEvent>>>::toJSI(runtime, arg.events));
189
+ obj.setProperty(runtime, PropNameIDCache::get(runtime, "activities"), JSIConverter<std::optional<std::vector<margelo::nitro::healthkit::WorkoutActivity>>>::toJSI(runtime, arg.activities));
190
+ obj.setProperty(runtime, PropNameIDCache::get(runtime, "metadataAverageMETs"), JSIConverter<std::optional<margelo::nitro::healthkit::Quantity>>::toJSI(runtime, arg.metadataAverageMETs));
191
+ obj.setProperty(runtime, PropNameIDCache::get(runtime, "metadataElevationAscended"), JSIConverter<std::optional<margelo::nitro::healthkit::Quantity>>::toJSI(runtime, arg.metadataElevationAscended));
192
+ obj.setProperty(runtime, PropNameIDCache::get(runtime, "metadataElevationDescended"), JSIConverter<std::optional<margelo::nitro::healthkit::Quantity>>::toJSI(runtime, arg.metadataElevationDescended));
193
+ obj.setProperty(runtime, PropNameIDCache::get(runtime, "metadataIndoorWorkout"), JSIConverter<std::optional<bool>>::toJSI(runtime, arg.metadataIndoorWorkout));
194
+ obj.setProperty(runtime, PropNameIDCache::get(runtime, "metadataAverageSpeed"), JSIConverter<std::optional<margelo::nitro::healthkit::Quantity>>::toJSI(runtime, arg.metadataAverageSpeed));
195
+ obj.setProperty(runtime, PropNameIDCache::get(runtime, "metadataMaximumSpeed"), JSIConverter<std::optional<margelo::nitro::healthkit::Quantity>>::toJSI(runtime, arg.metadataMaximumSpeed));
196
+ obj.setProperty(runtime, PropNameIDCache::get(runtime, "sampleType"), JSIConverter<margelo::nitro::healthkit::SampleType>::toJSI(runtime, arg.sampleType));
197
+ obj.setProperty(runtime, PropNameIDCache::get(runtime, "startDate"), JSIConverter<std::chrono::system_clock::time_point>::toJSI(runtime, arg.startDate));
198
+ obj.setProperty(runtime, PropNameIDCache::get(runtime, "endDate"), JSIConverter<std::chrono::system_clock::time_point>::toJSI(runtime, arg.endDate));
199
+ obj.setProperty(runtime, PropNameIDCache::get(runtime, "hasUndeterminedDuration"), JSIConverter<bool>::toJSI(runtime, arg.hasUndeterminedDuration));
200
+ obj.setProperty(runtime, PropNameIDCache::get(runtime, "metadataWeatherCondition"), JSIConverter<std::optional<margelo::nitro::healthkit::WeatherCondition>>::toJSI(runtime, arg.metadataWeatherCondition));
201
+ obj.setProperty(runtime, PropNameIDCache::get(runtime, "metadataWeatherHumidity"), JSIConverter<std::optional<margelo::nitro::healthkit::Quantity>>::toJSI(runtime, arg.metadataWeatherHumidity));
202
+ obj.setProperty(runtime, PropNameIDCache::get(runtime, "metadataWeatherTemperature"), JSIConverter<std::optional<margelo::nitro::healthkit::Quantity>>::toJSI(runtime, arg.metadataWeatherTemperature));
203
+ obj.setProperty(runtime, PropNameIDCache::get(runtime, "metadataInsulinDeliveryReason"), JSIConverter<std::optional<margelo::nitro::healthkit::InsulinDeliveryReason>>::toJSI(runtime, arg.metadataInsulinDeliveryReason));
204
+ obj.setProperty(runtime, PropNameIDCache::get(runtime, "metadataHeartRateMotionContext"), JSIConverter<std::optional<margelo::nitro::healthkit::HeartRateMotionContext>>::toJSI(runtime, arg.metadataHeartRateMotionContext));
205
+ obj.setProperty(runtime, PropNameIDCache::get(runtime, "uuid"), JSIConverter<std::string>::toJSI(runtime, arg.uuid));
206
+ obj.setProperty(runtime, PropNameIDCache::get(runtime, "sourceRevision"), JSIConverter<margelo::nitro::healthkit::SourceRevision>::toJSI(runtime, arg.sourceRevision));
207
+ obj.setProperty(runtime, PropNameIDCache::get(runtime, "device"), JSIConverter<std::optional<margelo::nitro::healthkit::Device>>::toJSI(runtime, arg.device));
208
+ obj.setProperty(runtime, PropNameIDCache::get(runtime, "metadata"), JSIConverter<std::shared_ptr<AnyMap>>::toJSI(runtime, arg.metadata));
209
+ obj.setProperty(runtime, PropNameIDCache::get(runtime, "metadataExternalUUID"), JSIConverter<std::optional<std::string>>::toJSI(runtime, arg.metadataExternalUUID));
210
+ obj.setProperty(runtime, PropNameIDCache::get(runtime, "metadataTimeZone"), JSIConverter<std::optional<std::string>>::toJSI(runtime, arg.metadataTimeZone));
211
+ obj.setProperty(runtime, PropNameIDCache::get(runtime, "metadataWasUserEntered"), JSIConverter<std::optional<bool>>::toJSI(runtime, arg.metadataWasUserEntered));
212
+ obj.setProperty(runtime, PropNameIDCache::get(runtime, "metadataDeviceSerialNumber"), JSIConverter<std::optional<std::string>>::toJSI(runtime, arg.metadataDeviceSerialNumber));
213
+ obj.setProperty(runtime, PropNameIDCache::get(runtime, "metadataUdiDeviceIdentifier"), JSIConverter<std::optional<std::string>>::toJSI(runtime, arg.metadataUdiDeviceIdentifier));
214
+ obj.setProperty(runtime, PropNameIDCache::get(runtime, "metadataUdiProductionIdentifier"), JSIConverter<std::optional<std::string>>::toJSI(runtime, arg.metadataUdiProductionIdentifier));
215
+ obj.setProperty(runtime, PropNameIDCache::get(runtime, "metadataDigitalSignature"), JSIConverter<std::optional<std::string>>::toJSI(runtime, arg.metadataDigitalSignature));
216
+ obj.setProperty(runtime, PropNameIDCache::get(runtime, "metadataDeviceName"), JSIConverter<std::optional<std::string>>::toJSI(runtime, arg.metadataDeviceName));
217
+ obj.setProperty(runtime, PropNameIDCache::get(runtime, "metadataDeviceManufacturerName"), JSIConverter<std::optional<std::string>>::toJSI(runtime, arg.metadataDeviceManufacturerName));
218
+ obj.setProperty(runtime, PropNameIDCache::get(runtime, "metadataSyncIdentifier"), JSIConverter<std::optional<std::string>>::toJSI(runtime, arg.metadataSyncIdentifier));
219
+ obj.setProperty(runtime, PropNameIDCache::get(runtime, "metadataSyncVersion"), JSIConverter<std::optional<double>>::toJSI(runtime, arg.metadataSyncVersion));
220
+ obj.setProperty(runtime, PropNameIDCache::get(runtime, "metadataWasTakenInLab"), JSIConverter<std::optional<bool>>::toJSI(runtime, arg.metadataWasTakenInLab));
221
+ obj.setProperty(runtime, PropNameIDCache::get(runtime, "metadataReferenceRangeLowerLimit"), JSIConverter<std::optional<double>>::toJSI(runtime, arg.metadataReferenceRangeLowerLimit));
222
+ obj.setProperty(runtime, PropNameIDCache::get(runtime, "metadataReferenceRangeUpperLimit"), JSIConverter<std::optional<double>>::toJSI(runtime, arg.metadataReferenceRangeUpperLimit));
223
+ obj.setProperty(runtime, PropNameIDCache::get(runtime, "metadataAlgorithmVersion"), JSIConverter<std::optional<double>>::toJSI(runtime, arg.metadataAlgorithmVersion));
216
224
  return obj;
217
225
  }
218
226
  static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
@@ -223,48 +231,48 @@ namespace margelo::nitro {
223
231
  if (!nitro::isPlainObject(runtime, obj)) {
224
232
  return false;
225
233
  }
226
- if (!JSIConverter<margelo::nitro::healthkit::WorkoutActivityType>::canConvert(runtime, obj.getProperty(runtime, "workoutActivityType"))) return false;
227
- if (!JSIConverter<margelo::nitro::healthkit::Quantity>::canConvert(runtime, obj.getProperty(runtime, "duration"))) return false;
228
- if (!JSIConverter<std::optional<margelo::nitro::healthkit::Quantity>>::canConvert(runtime, obj.getProperty(runtime, "totalEnergyBurned"))) return false;
229
- if (!JSIConverter<std::optional<margelo::nitro::healthkit::Quantity>>::canConvert(runtime, obj.getProperty(runtime, "totalDistance"))) return false;
230
- if (!JSIConverter<std::optional<margelo::nitro::healthkit::Quantity>>::canConvert(runtime, obj.getProperty(runtime, "totalSwimmingStrokeCount"))) return false;
231
- if (!JSIConverter<std::optional<margelo::nitro::healthkit::Quantity>>::canConvert(runtime, obj.getProperty(runtime, "totalFlightsClimbed"))) return false;
232
- if (!JSIConverter<std::optional<std::vector<margelo::nitro::healthkit::WorkoutEvent>>>::canConvert(runtime, obj.getProperty(runtime, "events"))) return false;
233
- if (!JSIConverter<std::optional<std::vector<margelo::nitro::healthkit::WorkoutActivity>>>::canConvert(runtime, obj.getProperty(runtime, "activities"))) return false;
234
- if (!JSIConverter<std::optional<margelo::nitro::healthkit::Quantity>>::canConvert(runtime, obj.getProperty(runtime, "metadataAverageMETs"))) return false;
235
- if (!JSIConverter<std::optional<margelo::nitro::healthkit::Quantity>>::canConvert(runtime, obj.getProperty(runtime, "metadataElevationAscended"))) return false;
236
- if (!JSIConverter<std::optional<margelo::nitro::healthkit::Quantity>>::canConvert(runtime, obj.getProperty(runtime, "metadataElevationDescended"))) return false;
237
- if (!JSIConverter<std::optional<bool>>::canConvert(runtime, obj.getProperty(runtime, "metadataIndoorWorkout"))) return false;
238
- if (!JSIConverter<std::optional<margelo::nitro::healthkit::Quantity>>::canConvert(runtime, obj.getProperty(runtime, "metadataAverageSpeed"))) return false;
239
- if (!JSIConverter<std::optional<margelo::nitro::healthkit::Quantity>>::canConvert(runtime, obj.getProperty(runtime, "metadataMaximumSpeed"))) return false;
240
- if (!JSIConverter<margelo::nitro::healthkit::SampleType>::canConvert(runtime, obj.getProperty(runtime, "sampleType"))) return false;
241
- if (!JSIConverter<std::chrono::system_clock::time_point>::canConvert(runtime, obj.getProperty(runtime, "startDate"))) return false;
242
- if (!JSIConverter<std::chrono::system_clock::time_point>::canConvert(runtime, obj.getProperty(runtime, "endDate"))) return false;
243
- if (!JSIConverter<bool>::canConvert(runtime, obj.getProperty(runtime, "hasUndeterminedDuration"))) return false;
244
- if (!JSIConverter<std::optional<margelo::nitro::healthkit::WeatherCondition>>::canConvert(runtime, obj.getProperty(runtime, "metadataWeatherCondition"))) return false;
245
- if (!JSIConverter<std::optional<margelo::nitro::healthkit::Quantity>>::canConvert(runtime, obj.getProperty(runtime, "metadataWeatherHumidity"))) return false;
246
- if (!JSIConverter<std::optional<margelo::nitro::healthkit::Quantity>>::canConvert(runtime, obj.getProperty(runtime, "metadataWeatherTemperature"))) return false;
247
- if (!JSIConverter<std::optional<margelo::nitro::healthkit::InsulinDeliveryReason>>::canConvert(runtime, obj.getProperty(runtime, "metadataInsulinDeliveryReason"))) return false;
248
- if (!JSIConverter<std::optional<margelo::nitro::healthkit::HeartRateMotionContext>>::canConvert(runtime, obj.getProperty(runtime, "metadataHeartRateMotionContext"))) return false;
249
- if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "uuid"))) return false;
250
- if (!JSIConverter<margelo::nitro::healthkit::SourceRevision>::canConvert(runtime, obj.getProperty(runtime, "sourceRevision"))) return false;
251
- if (!JSIConverter<std::optional<margelo::nitro::healthkit::Device>>::canConvert(runtime, obj.getProperty(runtime, "device"))) return false;
252
- if (!JSIConverter<std::shared_ptr<AnyMap>>::canConvert(runtime, obj.getProperty(runtime, "metadata"))) return false;
253
- if (!JSIConverter<std::optional<std::string>>::canConvert(runtime, obj.getProperty(runtime, "metadataExternalUUID"))) return false;
254
- if (!JSIConverter<std::optional<std::string>>::canConvert(runtime, obj.getProperty(runtime, "metadataTimeZone"))) return false;
255
- if (!JSIConverter<std::optional<bool>>::canConvert(runtime, obj.getProperty(runtime, "metadataWasUserEntered"))) return false;
256
- if (!JSIConverter<std::optional<std::string>>::canConvert(runtime, obj.getProperty(runtime, "metadataDeviceSerialNumber"))) return false;
257
- if (!JSIConverter<std::optional<std::string>>::canConvert(runtime, obj.getProperty(runtime, "metadataUdiDeviceIdentifier"))) return false;
258
- if (!JSIConverter<std::optional<std::string>>::canConvert(runtime, obj.getProperty(runtime, "metadataUdiProductionIdentifier"))) return false;
259
- if (!JSIConverter<std::optional<std::string>>::canConvert(runtime, obj.getProperty(runtime, "metadataDigitalSignature"))) return false;
260
- if (!JSIConverter<std::optional<std::string>>::canConvert(runtime, obj.getProperty(runtime, "metadataDeviceName"))) return false;
261
- if (!JSIConverter<std::optional<std::string>>::canConvert(runtime, obj.getProperty(runtime, "metadataDeviceManufacturerName"))) return false;
262
- if (!JSIConverter<std::optional<std::string>>::canConvert(runtime, obj.getProperty(runtime, "metadataSyncIdentifier"))) return false;
263
- if (!JSIConverter<std::optional<double>>::canConvert(runtime, obj.getProperty(runtime, "metadataSyncVersion"))) return false;
264
- if (!JSIConverter<std::optional<bool>>::canConvert(runtime, obj.getProperty(runtime, "metadataWasTakenInLab"))) return false;
265
- if (!JSIConverter<std::optional<double>>::canConvert(runtime, obj.getProperty(runtime, "metadataReferenceRangeLowerLimit"))) return false;
266
- if (!JSIConverter<std::optional<double>>::canConvert(runtime, obj.getProperty(runtime, "metadataReferenceRangeUpperLimit"))) return false;
267
- if (!JSIConverter<std::optional<double>>::canConvert(runtime, obj.getProperty(runtime, "metadataAlgorithmVersion"))) return false;
234
+ if (!JSIConverter<margelo::nitro::healthkit::WorkoutActivityType>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "workoutActivityType")))) return false;
235
+ if (!JSIConverter<margelo::nitro::healthkit::Quantity>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "duration")))) return false;
236
+ if (!JSIConverter<std::optional<margelo::nitro::healthkit::Quantity>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "totalEnergyBurned")))) return false;
237
+ if (!JSIConverter<std::optional<margelo::nitro::healthkit::Quantity>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "totalDistance")))) return false;
238
+ if (!JSIConverter<std::optional<margelo::nitro::healthkit::Quantity>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "totalSwimmingStrokeCount")))) return false;
239
+ if (!JSIConverter<std::optional<margelo::nitro::healthkit::Quantity>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "totalFlightsClimbed")))) return false;
240
+ if (!JSIConverter<std::optional<std::vector<margelo::nitro::healthkit::WorkoutEvent>>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "events")))) return false;
241
+ if (!JSIConverter<std::optional<std::vector<margelo::nitro::healthkit::WorkoutActivity>>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "activities")))) return false;
242
+ if (!JSIConverter<std::optional<margelo::nitro::healthkit::Quantity>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "metadataAverageMETs")))) return false;
243
+ if (!JSIConverter<std::optional<margelo::nitro::healthkit::Quantity>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "metadataElevationAscended")))) return false;
244
+ if (!JSIConverter<std::optional<margelo::nitro::healthkit::Quantity>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "metadataElevationDescended")))) return false;
245
+ if (!JSIConverter<std::optional<bool>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "metadataIndoorWorkout")))) return false;
246
+ if (!JSIConverter<std::optional<margelo::nitro::healthkit::Quantity>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "metadataAverageSpeed")))) return false;
247
+ if (!JSIConverter<std::optional<margelo::nitro::healthkit::Quantity>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "metadataMaximumSpeed")))) return false;
248
+ if (!JSIConverter<margelo::nitro::healthkit::SampleType>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "sampleType")))) return false;
249
+ if (!JSIConverter<std::chrono::system_clock::time_point>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "startDate")))) return false;
250
+ if (!JSIConverter<std::chrono::system_clock::time_point>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "endDate")))) return false;
251
+ if (!JSIConverter<bool>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "hasUndeterminedDuration")))) return false;
252
+ if (!JSIConverter<std::optional<margelo::nitro::healthkit::WeatherCondition>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "metadataWeatherCondition")))) return false;
253
+ if (!JSIConverter<std::optional<margelo::nitro::healthkit::Quantity>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "metadataWeatherHumidity")))) return false;
254
+ if (!JSIConverter<std::optional<margelo::nitro::healthkit::Quantity>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "metadataWeatherTemperature")))) return false;
255
+ if (!JSIConverter<std::optional<margelo::nitro::healthkit::InsulinDeliveryReason>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "metadataInsulinDeliveryReason")))) return false;
256
+ if (!JSIConverter<std::optional<margelo::nitro::healthkit::HeartRateMotionContext>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "metadataHeartRateMotionContext")))) return false;
257
+ if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "uuid")))) return false;
258
+ if (!JSIConverter<margelo::nitro::healthkit::SourceRevision>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "sourceRevision")))) return false;
259
+ if (!JSIConverter<std::optional<margelo::nitro::healthkit::Device>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "device")))) return false;
260
+ if (!JSIConverter<std::shared_ptr<AnyMap>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "metadata")))) return false;
261
+ if (!JSIConverter<std::optional<std::string>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "metadataExternalUUID")))) return false;
262
+ if (!JSIConverter<std::optional<std::string>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "metadataTimeZone")))) return false;
263
+ if (!JSIConverter<std::optional<bool>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "metadataWasUserEntered")))) return false;
264
+ if (!JSIConverter<std::optional<std::string>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "metadataDeviceSerialNumber")))) return false;
265
+ if (!JSIConverter<std::optional<std::string>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "metadataUdiDeviceIdentifier")))) return false;
266
+ if (!JSIConverter<std::optional<std::string>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "metadataUdiProductionIdentifier")))) return false;
267
+ if (!JSIConverter<std::optional<std::string>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "metadataDigitalSignature")))) return false;
268
+ if (!JSIConverter<std::optional<std::string>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "metadataDeviceName")))) return false;
269
+ if (!JSIConverter<std::optional<std::string>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "metadataDeviceManufacturerName")))) return false;
270
+ if (!JSIConverter<std::optional<std::string>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "metadataSyncIdentifier")))) return false;
271
+ if (!JSIConverter<std::optional<double>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "metadataSyncVersion")))) return false;
272
+ if (!JSIConverter<std::optional<bool>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "metadataWasTakenInLab")))) return false;
273
+ if (!JSIConverter<std::optional<double>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "metadataReferenceRangeLowerLimit")))) return false;
274
+ if (!JSIConverter<std::optional<double>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "metadataReferenceRangeUpperLimit")))) return false;
275
+ if (!JSIConverter<std::optional<double>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "metadataAlgorithmVersion")))) return false;
268
276
  return true;
269
277
  }
270
278
  };
@@ -2,7 +2,7 @@
2
2
  /// WorkoutSessionLocationType.hpp
3
3
  /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
4
  /// https://github.com/mrousavy/nitro
5
- /// Copyright © 2026 Marc Rousavy @ Margelo
5
+ /// Copyright © Marc Rousavy @ Margelo
6
6
  ///
7
7
 
8
8
  #pragma once
@@ -2,7 +2,7 @@
2
2
  /// WorkoutTotals.hpp
3
3
  /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
4
  /// https://github.com/mrousavy/nitro
5
- /// Copyright © 2026 Marc Rousavy @ Margelo
5
+ /// Copyright © Marc Rousavy @ Margelo
6
6
  ///
7
7
 
8
8
  #pragma once
@@ -22,6 +22,11 @@
22
22
  #else
23
23
  #error NitroModules cannot be found! Are you sure you installed NitroModules properly?
24
24
  #endif
25
+ #if __has_include(<NitroModules/PropNameIDCache.hpp>)
26
+ #include <NitroModules/PropNameIDCache.hpp>
27
+ #else
28
+ #error NitroModules cannot be found! Are you sure you installed NitroModules properly?
29
+ #endif
25
30
 
26
31
 
27
32
 
@@ -32,7 +37,7 @@ namespace margelo::nitro::healthkit {
32
37
  /**
33
38
  * A struct which can be represented as a JavaScript object (WorkoutTotals).
34
39
  */
35
- struct WorkoutTotals {
40
+ struct WorkoutTotals final {
36
41
  public:
37
42
  std::optional<double> distance SWIFT_PRIVATE;
38
43
  std::optional<double> energyBurned SWIFT_PRIVATE;
@@ -40,6 +45,9 @@ namespace margelo::nitro::healthkit {
40
45
  public:
41
46
  WorkoutTotals() = default;
42
47
  explicit WorkoutTotals(std::optional<double> distance, std::optional<double> energyBurned): distance(distance), energyBurned(energyBurned) {}
48
+
49
+ public:
50
+ friend bool operator==(const WorkoutTotals& lhs, const WorkoutTotals& rhs) = default;
43
51
  };
44
52
 
45
53
  } // namespace margelo::nitro::healthkit
@@ -52,14 +60,14 @@ namespace margelo::nitro {
52
60
  static inline margelo::nitro::healthkit::WorkoutTotals fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
53
61
  jsi::Object obj = arg.asObject(runtime);
54
62
  return margelo::nitro::healthkit::WorkoutTotals(
55
- JSIConverter<std::optional<double>>::fromJSI(runtime, obj.getProperty(runtime, "distance")),
56
- JSIConverter<std::optional<double>>::fromJSI(runtime, obj.getProperty(runtime, "energyBurned"))
63
+ JSIConverter<std::optional<double>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "distance"))),
64
+ JSIConverter<std::optional<double>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "energyBurned")))
57
65
  );
58
66
  }
59
67
  static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::healthkit::WorkoutTotals& arg) {
60
68
  jsi::Object obj(runtime);
61
- obj.setProperty(runtime, "distance", JSIConverter<std::optional<double>>::toJSI(runtime, arg.distance));
62
- obj.setProperty(runtime, "energyBurned", JSIConverter<std::optional<double>>::toJSI(runtime, arg.energyBurned));
69
+ obj.setProperty(runtime, PropNameIDCache::get(runtime, "distance"), JSIConverter<std::optional<double>>::toJSI(runtime, arg.distance));
70
+ obj.setProperty(runtime, PropNameIDCache::get(runtime, "energyBurned"), JSIConverter<std::optional<double>>::toJSI(runtime, arg.energyBurned));
63
71
  return obj;
64
72
  }
65
73
  static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
@@ -70,8 +78,8 @@ namespace margelo::nitro {
70
78
  if (!nitro::isPlainObject(runtime, obj)) {
71
79
  return false;
72
80
  }
73
- if (!JSIConverter<std::optional<double>>::canConvert(runtime, obj.getProperty(runtime, "distance"))) return false;
74
- if (!JSIConverter<std::optional<double>>::canConvert(runtime, obj.getProperty(runtime, "energyBurned"))) return false;
81
+ if (!JSIConverter<std::optional<double>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "distance")))) return false;
82
+ if (!JSIConverter<std::optional<double>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "energyBurned")))) return false;
75
83
  return true;
76
84
  }
77
85
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kingstinct/react-native-healthkit",
3
- "version": "13.2.0",
3
+ "version": "13.2.2",
4
4
  "description": "React Native bindings for HealthKit",
5
5
  "main": "lib/commonjs/index.js",
6
6
  "module": "lib/module/index.js",
@@ -91,15 +91,15 @@
91
91
  "devDependencies": {
92
92
  "@testing-library/react-native": "^13.3.3",
93
93
  "@types/react": "~19.1.17",
94
- "nitrogen": "^0.31.10",
94
+ "nitrogen": "^0.33.9",
95
95
  "react": "19.1.0",
96
96
  "react-native": "0.81.5",
97
- "react-native-nitro-modules": "^0.31.10",
97
+ "react-native-nitro-modules": "^0.33.9",
98
98
  "typescript": "~5.9.3"
99
99
  },
100
100
  "peerDependencies": {
101
101
  "react": ">=19",
102
102
  "react-native": ">=0.79",
103
- "react-native-nitro-modules": ">=0.30"
103
+ "react-native-nitro-modules": ">=0.33"
104
104
  }
105
105
  }
@@ -59,7 +59,7 @@ export interface CoreModule extends HybridObject<{ ios: 'swift' }> {
59
59
  querySources(
60
60
  identifier: SampleTypeIdentifier,
61
61
  filter?: FilterForSamples,
62
- ): Promise<readonly SourceProxy[]>
62
+ ): Promise<SourceProxy[]>
63
63
 
64
64
  /** @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1614180-requestauthorizationtoaccess Apple Docs }
65
65
  * @param {SampleTypeIdentifier} typeIdentifier - The type identifier of the sample to request authorization for.