@kingstinct/react-native-healthkit 13.2.1 → 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 (327) hide show
  1. package/ios/Constants.swift +1 -1
  2. package/ios/QuantityTypeModule.swift +97 -64
  3. package/lib/typescript/healthkit.d.ts +2 -2
  4. package/lib/typescript/healthkit.ios.d.ts +4 -4
  5. package/lib/typescript/specs/CoreModule.nitro.d.ts +1 -1
  6. package/lib/typescript/specs/QuantityTypeModule.nitro.d.ts +2 -2
  7. package/lib/typescript/types/QuantityType.d.ts +1 -1
  8. package/lib/typescript/types/QueryOptions.d.ts +5 -4
  9. package/lib/typescript/types/Workouts.d.ts +3 -3
  10. package/nitrogen/generated/ios/ReactNativeHealthkit+autolinking.rb +2 -2
  11. package/nitrogen/generated/ios/ReactNativeHealthkit-Swift-Cxx-Bridge.cpp +1 -1
  12. package/nitrogen/generated/ios/ReactNativeHealthkit-Swift-Cxx-Bridge.hpp +68 -68
  13. package/nitrogen/generated/ios/ReactNativeHealthkit-Swift-Cxx-Umbrella.hpp +4 -1
  14. package/nitrogen/generated/ios/ReactNativeHealthkitAutolinking.mm +1 -1
  15. package/nitrogen/generated/ios/ReactNativeHealthkitAutolinking.swift +45 -71
  16. package/nitrogen/generated/ios/c++/HybridCategoryTypeModuleSpecSwift.cpp +1 -1
  17. package/nitrogen/generated/ios/c++/HybridCategoryTypeModuleSpecSwift.hpp +7 -1
  18. package/nitrogen/generated/ios/c++/HybridCharacteristicTypeModuleSpecSwift.cpp +1 -1
  19. package/nitrogen/generated/ios/c++/HybridCharacteristicTypeModuleSpecSwift.hpp +7 -1
  20. package/nitrogen/generated/ios/c++/HybridCoreModuleSpecSwift.cpp +1 -1
  21. package/nitrogen/generated/ios/c++/HybridCoreModuleSpecSwift.hpp +7 -1
  22. package/nitrogen/generated/ios/c++/HybridCorrelationTypeModuleSpecSwift.cpp +1 -1
  23. package/nitrogen/generated/ios/c++/HybridCorrelationTypeModuleSpecSwift.hpp +7 -1
  24. package/nitrogen/generated/ios/c++/HybridElectrocardiogramModuleSpecSwift.cpp +1 -1
  25. package/nitrogen/generated/ios/c++/HybridElectrocardiogramModuleSpecSwift.hpp +7 -1
  26. package/nitrogen/generated/ios/c++/HybridHeartbeatSeriesModuleSpecSwift.cpp +1 -1
  27. package/nitrogen/generated/ios/c++/HybridHeartbeatSeriesModuleSpecSwift.hpp +7 -1
  28. package/nitrogen/generated/ios/c++/HybridMedicationModuleSpecSwift.cpp +1 -1
  29. package/nitrogen/generated/ios/c++/HybridMedicationModuleSpecSwift.hpp +7 -1
  30. package/nitrogen/generated/ios/c++/HybridQuantityTypeModuleSpecSwift.cpp +1 -1
  31. package/nitrogen/generated/ios/c++/HybridQuantityTypeModuleSpecSwift.hpp +11 -2
  32. package/nitrogen/generated/ios/c++/HybridSourceProxySpecSwift.cpp +1 -1
  33. package/nitrogen/generated/ios/c++/HybridSourceProxySpecSwift.hpp +7 -1
  34. package/nitrogen/generated/ios/c++/HybridStateOfMindModuleSpecSwift.cpp +1 -1
  35. package/nitrogen/generated/ios/c++/HybridStateOfMindModuleSpecSwift.hpp +7 -1
  36. package/nitrogen/generated/ios/c++/HybridWorkoutProxySpecSwift.cpp +1 -1
  37. package/nitrogen/generated/ios/c++/HybridWorkoutProxySpecSwift.hpp +7 -1
  38. package/nitrogen/generated/ios/c++/HybridWorkoutsModuleSpecSwift.cpp +1 -1
  39. package/nitrogen/generated/ios/c++/HybridWorkoutsModuleSpecSwift.hpp +7 -1
  40. package/nitrogen/generated/ios/swift/AggregationStyle.swift +1 -1
  41. package/nitrogen/generated/ios/swift/AuthDataTypes.swift +19 -56
  42. package/nitrogen/generated/ios/swift/AuthorizationRequestStatus.swift +1 -1
  43. package/nitrogen/generated/ios/swift/AuthorizationStatus.swift +1 -1
  44. package/nitrogen/generated/ios/swift/BiologicalSex.swift +1 -1
  45. package/nitrogen/generated/ios/swift/BloodType.swift +1 -1
  46. package/nitrogen/generated/ios/swift/CategorySample.swift +166 -445
  47. package/nitrogen/generated/ios/swift/CategorySampleForSaving.swift +13 -56
  48. package/nitrogen/generated/ios/swift/CategorySamplesWithAnchorResponse.swift +7 -38
  49. package/nitrogen/generated/ios/swift/CategoryTypeIdentifier.swift +1 -1
  50. package/nitrogen/generated/ios/swift/ComparisonPredicateOperator.swift +1 -1
  51. package/nitrogen/generated/ios/swift/CorrelationObject.swift +1 -1
  52. package/nitrogen/generated/ios/swift/CorrelationSample.swift +187 -491
  53. package/nitrogen/generated/ios/swift/CorrelationTypeIdentifier.swift +1 -1
  54. package/nitrogen/generated/ios/swift/DateFilter.swift +37 -86
  55. package/nitrogen/generated/ios/swift/DeletedSample.swift +12 -31
  56. package/nitrogen/generated/ios/swift/Device.swift +73 -170
  57. package/nitrogen/generated/ios/swift/ECGQueryOptionsWithAnchor.swift +16 -53
  58. package/nitrogen/generated/ios/swift/ECGQueryOptionsWithSortOrder.swift +23 -66
  59. package/nitrogen/generated/ios/swift/ElectrocardiogramClassification.swift +1 -1
  60. package/nitrogen/generated/ios/swift/ElectrocardiogramLead.swift +1 -1
  61. package/nitrogen/generated/ios/swift/ElectrocardiogramSample.swift +195 -508
  62. package/nitrogen/generated/ios/swift/ElectrocardiogramSamplesWithAnchorResponse.swift +7 -38
  63. package/nitrogen/generated/ios/swift/ElectrocardiogramSymptomsStatus.swift +1 -1
  64. package/nitrogen/generated/ios/swift/ElectrocardiogramVoltage.swift +7 -26
  65. package/nitrogen/generated/ios/swift/FilterForSamples.swift +96 -241
  66. package/nitrogen/generated/ios/swift/FilterForSamplesBase.swift +49 -140
  67. package/nitrogen/generated/ios/swift/FilterForWorkouts.swift +67 -221
  68. package/nitrogen/generated/ios/swift/FilterForWorkoutsBase.swift +40 -140
  69. package/nitrogen/generated/ios/swift/FitzpatrickSkinType.swift +1 -1
  70. package/nitrogen/generated/ios/swift/Func_void.swift +1 -2
  71. package/nitrogen/generated/ios/swift/Func_void_AuthorizationRequestStatus.swift +1 -2
  72. package/nitrogen/generated/ios/swift/Func_void_BiologicalSex.swift +1 -2
  73. package/nitrogen/generated/ios/swift/Func_void_BloodType.swift +1 -2
  74. package/nitrogen/generated/ios/swift/Func_void_CategorySamplesWithAnchorResponse.swift +1 -2
  75. package/nitrogen/generated/ios/swift/Func_void_ElectrocardiogramSamplesWithAnchorResponse.swift +1 -2
  76. package/nitrogen/generated/ios/swift/Func_void_FitzpatrickSkinType.swift +1 -2
  77. package/nitrogen/generated/ios/swift/Func_void_HeartbeatSeriesSamplesWithAnchorResponse.swift +1 -2
  78. package/nitrogen/generated/ios/swift/Func_void_MedicationDoseEventsWithAnchorResponse.swift +1 -2
  79. package/nitrogen/generated/ios/swift/Func_void_OnChangeCallbackArgs.swift +1 -2
  80. package/nitrogen/generated/ios/swift/Func_void_QuantitySamplesWithAnchorResponse.swift +1 -2
  81. package/nitrogen/generated/ios/swift/Func_void_QueryCorrelationSamplesWithAnchorResponse.swift +1 -2
  82. package/nitrogen/generated/ios/swift/Func_void_QueryStatisticsResponse.swift +1 -2
  83. package/nitrogen/generated/ios/swift/Func_void_QueryWorkoutSamplesWithAnchorResponse.swift +1 -2
  84. package/nitrogen/generated/ios/swift/Func_void_StateOfMindSamplesWithAnchorResponse.swift +1 -2
  85. package/nitrogen/generated/ios/swift/Func_void_WheelchairUse.swift +1 -2
  86. package/nitrogen/generated/ios/swift/Func_void_bool.swift +1 -2
  87. package/nitrogen/generated/ios/swift/Func_void_double.swift +1 -2
  88. package/nitrogen/generated/ios/swift/Func_void_std__exception_ptr.swift +1 -2
  89. package/nitrogen/generated/ios/swift/Func_void_std__optional_CategorySample_.swift +1 -2
  90. package/nitrogen/generated/ios/swift/Func_void_std__optional_CorrelationSample_.swift +1 -2
  91. package/nitrogen/generated/ios/swift/Func_void_std__optional_QuantitySample_.swift +1 -2
  92. package/nitrogen/generated/ios/swift/Func_void_std__optional_QueryStatisticsResponse_.swift +1 -2
  93. package/nitrogen/generated/ios/swift/Func_void_std__optional_StateOfMindSample_.swift +1 -2
  94. package/nitrogen/generated/ios/swift/Func_void_std__optional_WorkoutPlan_.swift +1 -2
  95. package/nitrogen/generated/ios/swift/Func_void_std__optional_std__chrono__system_clock__time_point_.swift +1 -2
  96. package/nitrogen/generated/ios/swift/Func_void_std__shared_ptr_HybridWorkoutProxySpec_.swift +2 -3
  97. package/nitrogen/generated/ios/swift/Func_void_std__unordered_map_std__string__QueryStatisticsResponse_.swift +1 -2
  98. package/nitrogen/generated/ios/swift/Func_void_std__unordered_map_std__string__bool_.swift +1 -2
  99. package/nitrogen/generated/ios/swift/Func_void_std__vector_CategorySample_.swift +1 -2
  100. package/nitrogen/generated/ios/swift/Func_void_std__vector_CorrelationSample_.swift +1 -2
  101. package/nitrogen/generated/ios/swift/Func_void_std__vector_ElectrocardiogramSample_.swift +1 -2
  102. package/nitrogen/generated/ios/swift/Func_void_std__vector_HeartbeatSeriesSample_.swift +1 -2
  103. package/nitrogen/generated/ios/swift/Func_void_std__vector_IdentifierWithUnit_.swift +1 -2
  104. package/nitrogen/generated/ios/swift/Func_void_std__vector_MedicationDoseEvent_.swift +1 -2
  105. package/nitrogen/generated/ios/swift/Func_void_std__vector_QuantitySample_.swift +1 -2
  106. package/nitrogen/generated/ios/swift/Func_void_std__vector_QueryStatisticsResponseFromSingleSource_.swift +1 -2
  107. package/nitrogen/generated/ios/swift/Func_void_std__vector_QueryStatisticsResponse_.swift +1 -2
  108. package/nitrogen/generated/ios/swift/Func_void_std__vector_StateOfMindSample_.swift +1 -2
  109. package/nitrogen/generated/ios/swift/Func_void_std__vector_UserAnnotatedMedication_.swift +1 -2
  110. package/nitrogen/generated/ios/swift/Func_void_std__vector_WorkoutRoute_.swift +1 -2
  111. package/nitrogen/generated/ios/swift/Func_void_std__vector_std__shared_ptr_HybridSourceProxySpec__.swift +2 -3
  112. package/nitrogen/generated/ios/swift/Func_void_std__vector_std__shared_ptr_HybridWorkoutProxySpec__.swift +2 -3
  113. package/nitrogen/generated/ios/swift/GeneralForm.swift +1 -1
  114. package/nitrogen/generated/ios/swift/HeartRateMotionContext.swift +1 -1
  115. package/nitrogen/generated/ios/swift/Heartbeat.swift +5 -18
  116. package/nitrogen/generated/ios/swift/HeartbeatSeriesSample.swift +164 -443
  117. package/nitrogen/generated/ios/swift/HeartbeatSeriesSamplesWithAnchorResponse.swift +7 -38
  118. package/nitrogen/generated/ios/swift/HybridCategoryTypeModuleSpec.swift +3 -4
  119. package/nitrogen/generated/ios/swift/HybridCategoryTypeModuleSpec_cxx.swift +9 -2
  120. package/nitrogen/generated/ios/swift/HybridCharacteristicTypeModuleSpec.swift +3 -4
  121. package/nitrogen/generated/ios/swift/HybridCharacteristicTypeModuleSpec_cxx.swift +9 -2
  122. package/nitrogen/generated/ios/swift/HybridCoreModuleSpec.swift +3 -4
  123. package/nitrogen/generated/ios/swift/HybridCoreModuleSpec_cxx.swift +9 -2
  124. package/nitrogen/generated/ios/swift/HybridCorrelationTypeModuleSpec.swift +3 -4
  125. package/nitrogen/generated/ios/swift/HybridCorrelationTypeModuleSpec_cxx.swift +9 -2
  126. package/nitrogen/generated/ios/swift/HybridElectrocardiogramModuleSpec.swift +3 -4
  127. package/nitrogen/generated/ios/swift/HybridElectrocardiogramModuleSpec_cxx.swift +9 -2
  128. package/nitrogen/generated/ios/swift/HybridHeartbeatSeriesModuleSpec.swift +3 -4
  129. package/nitrogen/generated/ios/swift/HybridHeartbeatSeriesModuleSpec_cxx.swift +9 -2
  130. package/nitrogen/generated/ios/swift/HybridMedicationModuleSpec.swift +3 -4
  131. package/nitrogen/generated/ios/swift/HybridMedicationModuleSpec_cxx.swift +9 -2
  132. package/nitrogen/generated/ios/swift/HybridQuantityTypeModuleSpec.swift +4 -5
  133. package/nitrogen/generated/ios/swift/HybridQuantityTypeModuleSpec_cxx.swift +10 -3
  134. package/nitrogen/generated/ios/swift/HybridSourceProxySpec.swift +3 -4
  135. package/nitrogen/generated/ios/swift/HybridSourceProxySpec_cxx.swift +9 -2
  136. package/nitrogen/generated/ios/swift/HybridStateOfMindModuleSpec.swift +3 -4
  137. package/nitrogen/generated/ios/swift/HybridStateOfMindModuleSpec_cxx.swift +9 -2
  138. package/nitrogen/generated/ios/swift/HybridWorkoutProxySpec.swift +3 -4
  139. package/nitrogen/generated/ios/swift/HybridWorkoutProxySpec_cxx.swift +9 -2
  140. package/nitrogen/generated/ios/swift/HybridWorkoutsModuleSpec.swift +3 -4
  141. package/nitrogen/generated/ios/swift/HybridWorkoutsModuleSpec_cxx.swift +9 -2
  142. package/nitrogen/generated/ios/swift/IdentifierWithUnit.swift +5 -18
  143. package/nitrogen/generated/ios/swift/InsulinDeliveryReason.swift +1 -1
  144. package/nitrogen/generated/ios/swift/IntervalComponents.swift +46 -72
  145. package/nitrogen/generated/ios/swift/LocationForSaving.swift +17 -66
  146. package/nitrogen/generated/ios/swift/MedicationConcept.swift +9 -40
  147. package/nitrogen/generated/ios/swift/MedicationDoseEvent.swift +206 -531
  148. package/nitrogen/generated/ios/swift/MedicationDoseEventLogStatus.swift +1 -1
  149. package/nitrogen/generated/ios/swift/MedicationDoseEventScheduleType.swift +1 -1
  150. package/nitrogen/generated/ios/swift/MedicationDoseEventsWithAnchorResponse.swift +7 -38
  151. package/nitrogen/generated/ios/swift/ObjectTypeIdentifier.swift +1 -1
  152. package/nitrogen/generated/ios/swift/OnChangeCallbackArgs.swift +12 -31
  153. package/nitrogen/generated/ios/swift/PerObjectTypeIdentifier.swift +1 -1
  154. package/nitrogen/generated/ios/swift/PredicateWithMetadataKey.swift +32 -74
  155. package/nitrogen/generated/ios/swift/Quantity.swift +5 -18
  156. package/nitrogen/generated/ios/swift/QuantityDateInterval.swift +5 -18
  157. package/nitrogen/generated/ios/swift/QuantitySample.swift +168 -453
  158. package/nitrogen/generated/ios/swift/QuantitySampleForSaving.swift +22 -77
  159. package/nitrogen/generated/ios/swift/QuantitySamplesWithAnchorResponse.swift +7 -38
  160. package/nitrogen/generated/ios/swift/QuantityTypeIdentifier.swift +1 -1
  161. package/nitrogen/generated/ios/swift/QuantityTypeIdentifierWriteable.swift +496 -0
  162. package/nitrogen/generated/ios/swift/QueryCorrelationSamplesWithAnchorResponse.swift +7 -38
  163. package/nitrogen/generated/ios/swift/QueryOptionsWithAnchor.swift +14 -45
  164. package/nitrogen/generated/ios/swift/QueryOptionsWithAnchorAndUnit.swift +23 -66
  165. package/nitrogen/generated/ios/swift/QueryOptionsWithSortOrder.swift +14 -45
  166. package/nitrogen/generated/ios/swift/QueryOptionsWithSortOrderAndUnit.swift +23 -66
  167. package/nitrogen/generated/ios/swift/QueryStatisticsResponse.swift +39 -163
  168. package/nitrogen/generated/ios/swift/QueryStatisticsResponseFromSingleSource.swift +39 -157
  169. package/nitrogen/generated/ios/swift/QueryWorkoutSamplesWithAnchorResponse.swift +11 -45
  170. package/nitrogen/generated/ios/swift/RelatedCoding.swift +14 -39
  171. package/nitrogen/generated/ios/swift/SampleForSaving.swift +1 -1
  172. package/nitrogen/generated/ios/swift/SampleType.swift +9 -34
  173. package/nitrogen/generated/ios/swift/SampleTypeIdentifier.swift +1 -1
  174. package/nitrogen/generated/ios/swift/SampleTypeIdentifierWriteable.swift +1 -1
  175. package/nitrogen/generated/ios/swift/Source.swift +5 -18
  176. package/nitrogen/generated/ios/swift/SourceRevision.swift +27 -67
  177. package/nitrogen/generated/ios/swift/StateOfMindAssociation.swift +1 -1
  178. package/nitrogen/generated/ios/swift/StateOfMindKind.swift +1 -1
  179. package/nitrogen/generated/ios/swift/StateOfMindLabel.swift +1 -1
  180. package/nitrogen/generated/ios/swift/StateOfMindSample.swift +172 -481
  181. package/nitrogen/generated/ios/swift/StateOfMindSamplesWithAnchorResponse.swift +7 -38
  182. package/nitrogen/generated/ios/swift/StateOfMindValenceClassification.swift +1 -1
  183. package/nitrogen/generated/ios/swift/StatisticsOptions.swift +1 -1
  184. package/nitrogen/generated/ios/swift/StatisticsQueryOptions.swift +12 -37
  185. package/nitrogen/generated/ios/swift/UpdateFrequency.swift +1 -1
  186. package/nitrogen/generated/ios/swift/UserAnnotatedMedication.swift +16 -47
  187. package/nitrogen/generated/ios/swift/Variant_Bool_String_Double_Date.swift +1 -1
  188. package/nitrogen/generated/ios/swift/WeatherCondition.swift +1 -1
  189. package/nitrogen/generated/ios/swift/WheelchairUse.swift +1 -1
  190. package/nitrogen/generated/ios/swift/WorkoutActivity.swift +9 -34
  191. package/nitrogen/generated/ios/swift/WorkoutActivityType.swift +1 -1
  192. package/nitrogen/generated/ios/swift/WorkoutConfiguration.swift +5 -24
  193. package/nitrogen/generated/ios/swift/WorkoutDurationPredicate.swift +5 -18
  194. package/nitrogen/generated/ios/swift/WorkoutEvent.swift +7 -26
  195. package/nitrogen/generated/ios/swift/WorkoutEventType.swift +1 -1
  196. package/nitrogen/generated/ios/swift/WorkoutPlan.swift +5 -18
  197. package/nitrogen/generated/ios/swift/WorkoutQueryOptions.swift +14 -45
  198. package/nitrogen/generated/ios/swift/WorkoutQueryOptionsWithAnchor.swift +14 -45
  199. package/nitrogen/generated/ios/swift/WorkoutRoute.swift +21 -51
  200. package/nitrogen/generated/ios/swift/WorkoutRouteLocation.swift +28 -88
  201. package/nitrogen/generated/ios/swift/WorkoutSample.swift +211 -646
  202. package/nitrogen/generated/ios/swift/WorkoutSessionLocationType.swift +1 -1
  203. package/nitrogen/generated/ios/swift/WorkoutTotals.swift +19 -30
  204. package/nitrogen/generated/shared/c++/AggregationStyle.hpp +1 -1
  205. package/nitrogen/generated/shared/c++/AuthDataTypes.hpp +16 -8
  206. package/nitrogen/generated/shared/c++/AuthorizationRequestStatus.hpp +1 -1
  207. package/nitrogen/generated/shared/c++/AuthorizationStatus.hpp +1 -1
  208. package/nitrogen/generated/shared/c++/BiologicalSex.hpp +1 -1
  209. package/nitrogen/generated/shared/c++/BloodType.hpp +1 -1
  210. package/nitrogen/generated/shared/c++/CategorySample.hpp +100 -92
  211. package/nitrogen/generated/shared/c++/CategorySampleForSaving.hpp +28 -20
  212. package/nitrogen/generated/shared/c++/CategorySamplesWithAnchorResponse.hpp +19 -11
  213. package/nitrogen/generated/shared/c++/CategoryTypeIdentifier.hpp +1 -1
  214. package/nitrogen/generated/shared/c++/ComparisonPredicateOperator.hpp +1 -1
  215. package/nitrogen/generated/shared/c++/CorrelationSample.hpp +103 -95
  216. package/nitrogen/generated/shared/c++/CorrelationTypeIdentifier.hpp +1 -1
  217. package/nitrogen/generated/shared/c++/DateFilter.hpp +22 -14
  218. package/nitrogen/generated/shared/c++/DeletedSample.hpp +16 -8
  219. package/nitrogen/generated/shared/c++/Device.hpp +34 -26
  220. package/nitrogen/generated/shared/c++/ECGQueryOptionsWithAnchor.hpp +22 -14
  221. package/nitrogen/generated/shared/c++/ECGQueryOptionsWithSortOrder.hpp +22 -14
  222. package/nitrogen/generated/shared/c++/ElectrocardiogramClassification.hpp +1 -1
  223. package/nitrogen/generated/shared/c++/ElectrocardiogramLead.hpp +1 -1
  224. package/nitrogen/generated/shared/c++/ElectrocardiogramSample.hpp +112 -104
  225. package/nitrogen/generated/shared/c++/ElectrocardiogramSamplesWithAnchorResponse.hpp +19 -11
  226. package/nitrogen/generated/shared/c++/ElectrocardiogramSymptomsStatus.hpp +1 -1
  227. package/nitrogen/generated/shared/c++/ElectrocardiogramVoltage.hpp +19 -11
  228. package/nitrogen/generated/shared/c++/FilterForSamples.hpp +44 -36
  229. package/nitrogen/generated/shared/c++/FilterForSamplesBase.hpp +28 -20
  230. package/nitrogen/generated/shared/c++/FilterForWorkouts.hpp +40 -32
  231. package/nitrogen/generated/shared/c++/FilterForWorkoutsBase.hpp +31 -23
  232. package/nitrogen/generated/shared/c++/FitzpatrickSkinType.hpp +1 -1
  233. package/nitrogen/generated/shared/c++/GeneralForm.hpp +1 -1
  234. package/nitrogen/generated/shared/c++/HeartRateMotionContext.hpp +1 -1
  235. package/nitrogen/generated/shared/c++/Heartbeat.hpp +16 -8
  236. package/nitrogen/generated/shared/c++/HeartbeatSeriesSample.hpp +97 -89
  237. package/nitrogen/generated/shared/c++/HeartbeatSeriesSamplesWithAnchorResponse.hpp +19 -11
  238. package/nitrogen/generated/shared/c++/HybridCategoryTypeModuleSpec.cpp +1 -1
  239. package/nitrogen/generated/shared/c++/HybridCategoryTypeModuleSpec.hpp +1 -1
  240. package/nitrogen/generated/shared/c++/HybridCharacteristicTypeModuleSpec.cpp +1 -1
  241. package/nitrogen/generated/shared/c++/HybridCharacteristicTypeModuleSpec.hpp +1 -1
  242. package/nitrogen/generated/shared/c++/HybridCoreModuleSpec.cpp +1 -1
  243. package/nitrogen/generated/shared/c++/HybridCoreModuleSpec.hpp +1 -1
  244. package/nitrogen/generated/shared/c++/HybridCorrelationTypeModuleSpec.cpp +1 -1
  245. package/nitrogen/generated/shared/c++/HybridCorrelationTypeModuleSpec.hpp +1 -1
  246. package/nitrogen/generated/shared/c++/HybridElectrocardiogramModuleSpec.cpp +1 -1
  247. package/nitrogen/generated/shared/c++/HybridElectrocardiogramModuleSpec.hpp +1 -1
  248. package/nitrogen/generated/shared/c++/HybridHeartbeatSeriesModuleSpec.cpp +1 -1
  249. package/nitrogen/generated/shared/c++/HybridHeartbeatSeriesModuleSpec.hpp +1 -1
  250. package/nitrogen/generated/shared/c++/HybridMedicationModuleSpec.cpp +1 -1
  251. package/nitrogen/generated/shared/c++/HybridMedicationModuleSpec.hpp +1 -1
  252. package/nitrogen/generated/shared/c++/HybridQuantityTypeModuleSpec.cpp +1 -1
  253. package/nitrogen/generated/shared/c++/HybridQuantityTypeModuleSpec.hpp +5 -2
  254. package/nitrogen/generated/shared/c++/HybridSourceProxySpec.cpp +1 -1
  255. package/nitrogen/generated/shared/c++/HybridSourceProxySpec.hpp +1 -1
  256. package/nitrogen/generated/shared/c++/HybridStateOfMindModuleSpec.cpp +1 -1
  257. package/nitrogen/generated/shared/c++/HybridStateOfMindModuleSpec.hpp +1 -1
  258. package/nitrogen/generated/shared/c++/HybridWorkoutProxySpec.cpp +1 -1
  259. package/nitrogen/generated/shared/c++/HybridWorkoutProxySpec.hpp +1 -1
  260. package/nitrogen/generated/shared/c++/HybridWorkoutsModuleSpec.cpp +1 -1
  261. package/nitrogen/generated/shared/c++/HybridWorkoutsModuleSpec.hpp +1 -1
  262. package/nitrogen/generated/shared/c++/IdentifierWithUnit.hpp +16 -8
  263. package/nitrogen/generated/shared/c++/InsulinDeliveryReason.hpp +1 -1
  264. package/nitrogen/generated/shared/c++/IntervalComponents.hpp +25 -17
  265. package/nitrogen/generated/shared/c++/LocationForSaving.hpp +34 -26
  266. package/nitrogen/generated/shared/c++/MedicationConcept.hpp +22 -14
  267. package/nitrogen/generated/shared/c++/MedicationDoseEvent.hpp +118 -110
  268. package/nitrogen/generated/shared/c++/MedicationDoseEventLogStatus.hpp +1 -1
  269. package/nitrogen/generated/shared/c++/MedicationDoseEventScheduleType.hpp +1 -1
  270. package/nitrogen/generated/shared/c++/MedicationDoseEventsWithAnchorResponse.hpp +19 -11
  271. package/nitrogen/generated/shared/c++/ObjectTypeIdentifier.hpp +1 -1
  272. package/nitrogen/generated/shared/c++/OnChangeCallbackArgs.hpp +16 -8
  273. package/nitrogen/generated/shared/c++/PerObjectTypeIdentifier.hpp +1 -1
  274. package/nitrogen/generated/shared/c++/PredicateWithMetadataKey.hpp +19 -11
  275. package/nitrogen/generated/shared/c++/Quantity.hpp +16 -8
  276. package/nitrogen/generated/shared/c++/QuantityDateInterval.hpp +16 -8
  277. package/nitrogen/generated/shared/c++/QuantitySample.hpp +103 -95
  278. package/nitrogen/generated/shared/c++/QuantitySampleForSaving.hpp +31 -23
  279. package/nitrogen/generated/shared/c++/QuantitySamplesWithAnchorResponse.hpp +19 -11
  280. package/nitrogen/generated/shared/c++/QuantityTypeIdentifier.hpp +1 -1
  281. package/nitrogen/generated/shared/c++/QuantityTypeIdentifierWriteable.hpp +532 -0
  282. package/nitrogen/generated/shared/c++/QueryCorrelationSamplesWithAnchorResponse.hpp +19 -11
  283. package/nitrogen/generated/shared/c++/QueryOptionsWithAnchor.hpp +19 -11
  284. package/nitrogen/generated/shared/c++/QueryOptionsWithAnchorAndUnit.hpp +22 -14
  285. package/nitrogen/generated/shared/c++/QueryOptionsWithSortOrder.hpp +19 -11
  286. package/nitrogen/generated/shared/c++/QueryOptionsWithSortOrderAndUnit.hpp +22 -14
  287. package/nitrogen/generated/shared/c++/QueryStatisticsResponse.hpp +40 -32
  288. package/nitrogen/generated/shared/c++/QueryStatisticsResponseFromSingleSource.hpp +40 -32
  289. package/nitrogen/generated/shared/c++/QueryWorkoutSamplesWithAnchorResponse.hpp +19 -11
  290. package/nitrogen/generated/shared/c++/RelatedCoding.hpp +19 -11
  291. package/nitrogen/generated/shared/c++/SampleType.hpp +22 -14
  292. package/nitrogen/generated/shared/c++/SampleTypeIdentifier.hpp +1 -1
  293. package/nitrogen/generated/shared/c++/SampleTypeIdentifierWriteable.hpp +1 -1
  294. package/nitrogen/generated/shared/c++/Source.hpp +16 -8
  295. package/nitrogen/generated/shared/c++/SourceRevision.hpp +22 -14
  296. package/nitrogen/generated/shared/c++/StateOfMindAssociation.hpp +1 -1
  297. package/nitrogen/generated/shared/c++/StateOfMindKind.hpp +1 -1
  298. package/nitrogen/generated/shared/c++/StateOfMindLabel.hpp +1 -1
  299. package/nitrogen/generated/shared/c++/StateOfMindSample.hpp +109 -101
  300. package/nitrogen/generated/shared/c++/StateOfMindSamplesWithAnchorResponse.hpp +19 -11
  301. package/nitrogen/generated/shared/c++/StateOfMindValenceClassification.hpp +1 -1
  302. package/nitrogen/generated/shared/c++/StatisticsOptions.hpp +1 -1
  303. package/nitrogen/generated/shared/c++/StatisticsQueryOptions.hpp +16 -8
  304. package/nitrogen/generated/shared/c++/UpdateFrequency.hpp +1 -1
  305. package/nitrogen/generated/shared/c++/UserAnnotatedMedication.hpp +22 -14
  306. package/nitrogen/generated/shared/c++/WeatherCondition.hpp +1 -1
  307. package/nitrogen/generated/shared/c++/WheelchairUse.hpp +1 -1
  308. package/nitrogen/generated/shared/c++/WorkoutActivity.hpp +22 -14
  309. package/nitrogen/generated/shared/c++/WorkoutActivityType.hpp +1 -1
  310. package/nitrogen/generated/shared/c++/WorkoutConfiguration.hpp +16 -8
  311. package/nitrogen/generated/shared/c++/WorkoutDurationPredicate.hpp +16 -8
  312. package/nitrogen/generated/shared/c++/WorkoutEvent.hpp +19 -11
  313. package/nitrogen/generated/shared/c++/WorkoutEventType.hpp +1 -1
  314. package/nitrogen/generated/shared/c++/WorkoutPlan.hpp +16 -8
  315. package/nitrogen/generated/shared/c++/WorkoutQueryOptions.hpp +19 -11
  316. package/nitrogen/generated/shared/c++/WorkoutQueryOptionsWithAnchor.hpp +19 -11
  317. package/nitrogen/generated/shared/c++/WorkoutRoute.hpp +19 -11
  318. package/nitrogen/generated/shared/c++/WorkoutRouteLocation.hpp +40 -32
  319. package/nitrogen/generated/shared/c++/WorkoutSample.hpp +136 -128
  320. package/nitrogen/generated/shared/c++/WorkoutSessionLocationType.hpp +1 -1
  321. package/nitrogen/generated/shared/c++/WorkoutTotals.hpp +16 -8
  322. package/package.json +4 -4
  323. package/src/specs/CoreModule.nitro.ts +1 -1
  324. package/src/specs/QuantityTypeModule.nitro.ts +5 -2
  325. package/src/types/QuantityType.ts +1 -1
  326. package/src/types/QueryOptions.ts +5 -4
  327. package/src/types/Workouts.ts +3 -3
@@ -2,7 +2,7 @@
2
2
  /// WorkoutActivity.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 (WorkoutActivity).
35
40
  */
36
- struct WorkoutActivity {
41
+ struct WorkoutActivity final {
37
42
  public:
38
43
  std::chrono::system_clock::time_point startDate SWIFT_PRIVATE;
39
44
  std::chrono::system_clock::time_point endDate SWIFT_PRIVATE;
@@ -43,6 +48,9 @@ namespace margelo::nitro::healthkit {
43
48
  public:
44
49
  WorkoutActivity() = default;
45
50
  explicit WorkoutActivity(std::chrono::system_clock::time_point startDate, std::chrono::system_clock::time_point endDate, std::string uuid, double duration): startDate(startDate), endDate(endDate), uuid(uuid), duration(duration) {}
51
+
52
+ public:
53
+ friend bool operator==(const WorkoutActivity& lhs, const WorkoutActivity& rhs) = default;
46
54
  };
47
55
 
48
56
  } // namespace margelo::nitro::healthkit
@@ -55,18 +63,18 @@ namespace margelo::nitro {
55
63
  static inline margelo::nitro::healthkit::WorkoutActivity fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
56
64
  jsi::Object obj = arg.asObject(runtime);
57
65
  return margelo::nitro::healthkit::WorkoutActivity(
58
- JSIConverter<std::chrono::system_clock::time_point>::fromJSI(runtime, obj.getProperty(runtime, "startDate")),
59
- JSIConverter<std::chrono::system_clock::time_point>::fromJSI(runtime, obj.getProperty(runtime, "endDate")),
60
- JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "uuid")),
61
- JSIConverter<double>::fromJSI(runtime, obj.getProperty(runtime, "duration"))
66
+ JSIConverter<std::chrono::system_clock::time_point>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "startDate"))),
67
+ JSIConverter<std::chrono::system_clock::time_point>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "endDate"))),
68
+ JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "uuid"))),
69
+ JSIConverter<double>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "duration")))
62
70
  );
63
71
  }
64
72
  static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::healthkit::WorkoutActivity& arg) {
65
73
  jsi::Object obj(runtime);
66
- obj.setProperty(runtime, "startDate", JSIConverter<std::chrono::system_clock::time_point>::toJSI(runtime, arg.startDate));
67
- obj.setProperty(runtime, "endDate", JSIConverter<std::chrono::system_clock::time_point>::toJSI(runtime, arg.endDate));
68
- obj.setProperty(runtime, "uuid", JSIConverter<std::string>::toJSI(runtime, arg.uuid));
69
- obj.setProperty(runtime, "duration", JSIConverter<double>::toJSI(runtime, arg.duration));
74
+ obj.setProperty(runtime, PropNameIDCache::get(runtime, "startDate"), JSIConverter<std::chrono::system_clock::time_point>::toJSI(runtime, arg.startDate));
75
+ obj.setProperty(runtime, PropNameIDCache::get(runtime, "endDate"), JSIConverter<std::chrono::system_clock::time_point>::toJSI(runtime, arg.endDate));
76
+ obj.setProperty(runtime, PropNameIDCache::get(runtime, "uuid"), JSIConverter<std::string>::toJSI(runtime, arg.uuid));
77
+ obj.setProperty(runtime, PropNameIDCache::get(runtime, "duration"), JSIConverter<double>::toJSI(runtime, arg.duration));
70
78
  return obj;
71
79
  }
72
80
  static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
@@ -77,10 +85,10 @@ namespace margelo::nitro {
77
85
  if (!nitro::isPlainObject(runtime, obj)) {
78
86
  return false;
79
87
  }
80
- if (!JSIConverter<std::chrono::system_clock::time_point>::canConvert(runtime, obj.getProperty(runtime, "startDate"))) return false;
81
- if (!JSIConverter<std::chrono::system_clock::time_point>::canConvert(runtime, obj.getProperty(runtime, "endDate"))) return false;
82
- if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "uuid"))) return false;
83
- if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, "duration"))) return false;
88
+ if (!JSIConverter<std::chrono::system_clock::time_point>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "startDate")))) return false;
89
+ if (!JSIConverter<std::chrono::system_clock::time_point>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "endDate")))) return false;
90
+ if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "uuid")))) return false;
91
+ if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "duration")))) return false;
84
92
  return true;
85
93
  }
86
94
  };
@@ -2,7 +2,7 @@
2
2
  /// WorkoutActivityType.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
  /// WorkoutConfiguration.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; }
@@ -37,7 +42,7 @@ namespace margelo::nitro::healthkit {
37
42
  /**
38
43
  * A struct which can be represented as a JavaScript object (WorkoutConfiguration).
39
44
  */
40
- struct WorkoutConfiguration {
45
+ struct WorkoutConfiguration final {
41
46
  public:
42
47
  WorkoutActivityType activityType SWIFT_PRIVATE;
43
48
  std::optional<WorkoutSessionLocationType> locationType SWIFT_PRIVATE;
@@ -45,6 +50,9 @@ namespace margelo::nitro::healthkit {
45
50
  public:
46
51
  WorkoutConfiguration() = default;
47
52
  explicit WorkoutConfiguration(WorkoutActivityType activityType, std::optional<WorkoutSessionLocationType> locationType): activityType(activityType), locationType(locationType) {}
53
+
54
+ public:
55
+ friend bool operator==(const WorkoutConfiguration& lhs, const WorkoutConfiguration& rhs) = default;
48
56
  };
49
57
 
50
58
  } // namespace margelo::nitro::healthkit
@@ -57,14 +65,14 @@ namespace margelo::nitro {
57
65
  static inline margelo::nitro::healthkit::WorkoutConfiguration fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
58
66
  jsi::Object obj = arg.asObject(runtime);
59
67
  return margelo::nitro::healthkit::WorkoutConfiguration(
60
- JSIConverter<margelo::nitro::healthkit::WorkoutActivityType>::fromJSI(runtime, obj.getProperty(runtime, "activityType")),
61
- JSIConverter<std::optional<margelo::nitro::healthkit::WorkoutSessionLocationType>>::fromJSI(runtime, obj.getProperty(runtime, "locationType"))
68
+ JSIConverter<margelo::nitro::healthkit::WorkoutActivityType>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "activityType"))),
69
+ JSIConverter<std::optional<margelo::nitro::healthkit::WorkoutSessionLocationType>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "locationType")))
62
70
  );
63
71
  }
64
72
  static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::healthkit::WorkoutConfiguration& arg) {
65
73
  jsi::Object obj(runtime);
66
- obj.setProperty(runtime, "activityType", JSIConverter<margelo::nitro::healthkit::WorkoutActivityType>::toJSI(runtime, arg.activityType));
67
- obj.setProperty(runtime, "locationType", JSIConverter<std::optional<margelo::nitro::healthkit::WorkoutSessionLocationType>>::toJSI(runtime, arg.locationType));
74
+ obj.setProperty(runtime, PropNameIDCache::get(runtime, "activityType"), JSIConverter<margelo::nitro::healthkit::WorkoutActivityType>::toJSI(runtime, arg.activityType));
75
+ obj.setProperty(runtime, PropNameIDCache::get(runtime, "locationType"), JSIConverter<std::optional<margelo::nitro::healthkit::WorkoutSessionLocationType>>::toJSI(runtime, arg.locationType));
68
76
  return obj;
69
77
  }
70
78
  static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
@@ -75,8 +83,8 @@ namespace margelo::nitro {
75
83
  if (!nitro::isPlainObject(runtime, obj)) {
76
84
  return false;
77
85
  }
78
- if (!JSIConverter<margelo::nitro::healthkit::WorkoutActivityType>::canConvert(runtime, obj.getProperty(runtime, "activityType"))) return false;
79
- if (!JSIConverter<std::optional<margelo::nitro::healthkit::WorkoutSessionLocationType>>::canConvert(runtime, obj.getProperty(runtime, "locationType"))) return false;
86
+ if (!JSIConverter<margelo::nitro::healthkit::WorkoutActivityType>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "activityType")))) return false;
87
+ if (!JSIConverter<std::optional<margelo::nitro::healthkit::WorkoutSessionLocationType>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "locationType")))) return false;
80
88
  return true;
81
89
  }
82
90
  };
@@ -2,7 +2,7 @@
2
2
  /// WorkoutDurationPredicate.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 `ComparisonPredicateOperator` to properly resolve imports.
27
32
  namespace margelo::nitro::healthkit { enum class ComparisonPredicateOperator; }
@@ -33,7 +38,7 @@ namespace margelo::nitro::healthkit {
33
38
  /**
34
39
  * A struct which can be represented as a JavaScript object (WorkoutDurationPredicate).
35
40
  */
36
- struct WorkoutDurationPredicate {
41
+ struct WorkoutDurationPredicate final {
37
42
  public:
38
43
  ComparisonPredicateOperator predicateOperator SWIFT_PRIVATE;
39
44
  double durationInSeconds SWIFT_PRIVATE;
@@ -41,6 +46,9 @@ namespace margelo::nitro::healthkit {
41
46
  public:
42
47
  WorkoutDurationPredicate() = default;
43
48
  explicit WorkoutDurationPredicate(ComparisonPredicateOperator predicateOperator, double durationInSeconds): predicateOperator(predicateOperator), durationInSeconds(durationInSeconds) {}
49
+
50
+ public:
51
+ friend bool operator==(const WorkoutDurationPredicate& lhs, const WorkoutDurationPredicate& rhs) = default;
44
52
  };
45
53
 
46
54
  } // namespace margelo::nitro::healthkit
@@ -53,14 +61,14 @@ namespace margelo::nitro {
53
61
  static inline margelo::nitro::healthkit::WorkoutDurationPredicate fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
54
62
  jsi::Object obj = arg.asObject(runtime);
55
63
  return margelo::nitro::healthkit::WorkoutDurationPredicate(
56
- JSIConverter<margelo::nitro::healthkit::ComparisonPredicateOperator>::fromJSI(runtime, obj.getProperty(runtime, "predicateOperator")),
57
- JSIConverter<double>::fromJSI(runtime, obj.getProperty(runtime, "durationInSeconds"))
64
+ JSIConverter<margelo::nitro::healthkit::ComparisonPredicateOperator>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "predicateOperator"))),
65
+ JSIConverter<double>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "durationInSeconds")))
58
66
  );
59
67
  }
60
68
  static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::healthkit::WorkoutDurationPredicate& arg) {
61
69
  jsi::Object obj(runtime);
62
- obj.setProperty(runtime, "predicateOperator", JSIConverter<margelo::nitro::healthkit::ComparisonPredicateOperator>::toJSI(runtime, arg.predicateOperator));
63
- obj.setProperty(runtime, "durationInSeconds", JSIConverter<double>::toJSI(runtime, arg.durationInSeconds));
70
+ obj.setProperty(runtime, PropNameIDCache::get(runtime, "predicateOperator"), JSIConverter<margelo::nitro::healthkit::ComparisonPredicateOperator>::toJSI(runtime, arg.predicateOperator));
71
+ obj.setProperty(runtime, PropNameIDCache::get(runtime, "durationInSeconds"), JSIConverter<double>::toJSI(runtime, arg.durationInSeconds));
64
72
  return obj;
65
73
  }
66
74
  static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
@@ -71,8 +79,8 @@ namespace margelo::nitro {
71
79
  if (!nitro::isPlainObject(runtime, obj)) {
72
80
  return false;
73
81
  }
74
- if (!JSIConverter<margelo::nitro::healthkit::ComparisonPredicateOperator>::canConvert(runtime, obj.getProperty(runtime, "predicateOperator"))) return false;
75
- if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, "durationInSeconds"))) return false;
82
+ if (!JSIConverter<margelo::nitro::healthkit::ComparisonPredicateOperator>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "predicateOperator")))) return false;
83
+ if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "durationInSeconds")))) return false;
76
84
  return true;
77
85
  }
78
86
  };
@@ -2,7 +2,7 @@
2
2
  /// WorkoutEvent.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 `WorkoutEventType` to properly resolve imports.
27
32
  namespace margelo::nitro::healthkit { enum class WorkoutEventType; }
@@ -34,7 +39,7 @@ namespace margelo::nitro::healthkit {
34
39
  /**
35
40
  * A struct which can be represented as a JavaScript object (WorkoutEvent).
36
41
  */
37
- struct WorkoutEvent {
42
+ struct WorkoutEvent final {
38
43
  public:
39
44
  WorkoutEventType type SWIFT_PRIVATE;
40
45
  std::chrono::system_clock::time_point startDate SWIFT_PRIVATE;
@@ -43,6 +48,9 @@ namespace margelo::nitro::healthkit {
43
48
  public:
44
49
  WorkoutEvent() = default;
45
50
  explicit WorkoutEvent(WorkoutEventType type, std::chrono::system_clock::time_point startDate, std::chrono::system_clock::time_point endDate): type(type), startDate(startDate), endDate(endDate) {}
51
+
52
+ public:
53
+ friend bool operator==(const WorkoutEvent& lhs, const WorkoutEvent& rhs) = default;
46
54
  };
47
55
 
48
56
  } // namespace margelo::nitro::healthkit
@@ -55,16 +63,16 @@ namespace margelo::nitro {
55
63
  static inline margelo::nitro::healthkit::WorkoutEvent fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
56
64
  jsi::Object obj = arg.asObject(runtime);
57
65
  return margelo::nitro::healthkit::WorkoutEvent(
58
- JSIConverter<margelo::nitro::healthkit::WorkoutEventType>::fromJSI(runtime, obj.getProperty(runtime, "type")),
59
- JSIConverter<std::chrono::system_clock::time_point>::fromJSI(runtime, obj.getProperty(runtime, "startDate")),
60
- JSIConverter<std::chrono::system_clock::time_point>::fromJSI(runtime, obj.getProperty(runtime, "endDate"))
66
+ JSIConverter<margelo::nitro::healthkit::WorkoutEventType>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "type"))),
67
+ JSIConverter<std::chrono::system_clock::time_point>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "startDate"))),
68
+ JSIConverter<std::chrono::system_clock::time_point>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "endDate")))
61
69
  );
62
70
  }
63
71
  static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::healthkit::WorkoutEvent& arg) {
64
72
  jsi::Object obj(runtime);
65
- obj.setProperty(runtime, "type", JSIConverter<margelo::nitro::healthkit::WorkoutEventType>::toJSI(runtime, arg.type));
66
- obj.setProperty(runtime, "startDate", JSIConverter<std::chrono::system_clock::time_point>::toJSI(runtime, arg.startDate));
67
- obj.setProperty(runtime, "endDate", JSIConverter<std::chrono::system_clock::time_point>::toJSI(runtime, arg.endDate));
73
+ obj.setProperty(runtime, PropNameIDCache::get(runtime, "type"), JSIConverter<margelo::nitro::healthkit::WorkoutEventType>::toJSI(runtime, arg.type));
74
+ obj.setProperty(runtime, PropNameIDCache::get(runtime, "startDate"), JSIConverter<std::chrono::system_clock::time_point>::toJSI(runtime, arg.startDate));
75
+ obj.setProperty(runtime, PropNameIDCache::get(runtime, "endDate"), JSIConverter<std::chrono::system_clock::time_point>::toJSI(runtime, arg.endDate));
68
76
  return obj;
69
77
  }
70
78
  static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
@@ -75,9 +83,9 @@ namespace margelo::nitro {
75
83
  if (!nitro::isPlainObject(runtime, obj)) {
76
84
  return false;
77
85
  }
78
- if (!JSIConverter<margelo::nitro::healthkit::WorkoutEventType>::canConvert(runtime, obj.getProperty(runtime, "type"))) return false;
79
- if (!JSIConverter<std::chrono::system_clock::time_point>::canConvert(runtime, obj.getProperty(runtime, "startDate"))) return false;
80
- if (!JSIConverter<std::chrono::system_clock::time_point>::canConvert(runtime, obj.getProperty(runtime, "endDate"))) return false;
86
+ if (!JSIConverter<margelo::nitro::healthkit::WorkoutEventType>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "type")))) return false;
87
+ if (!JSIConverter<std::chrono::system_clock::time_point>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "startDate")))) return false;
88
+ if (!JSIConverter<std::chrono::system_clock::time_point>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "endDate")))) return false;
81
89
  return true;
82
90
  }
83
91
  };
@@ -2,7 +2,7 @@
2
2
  /// WorkoutEventType.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
  /// WorkoutPlan.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; }
@@ -34,7 +39,7 @@ namespace margelo::nitro::healthkit {
34
39
  /**
35
40
  * A struct which can be represented as a JavaScript object (WorkoutPlan).
36
41
  */
37
- struct WorkoutPlan {
42
+ struct WorkoutPlan final {
38
43
  public:
39
44
  std::string id SWIFT_PRIVATE;
40
45
  WorkoutActivityType activityType SWIFT_PRIVATE;
@@ -42,6 +47,9 @@ namespace margelo::nitro::healthkit {
42
47
  public:
43
48
  WorkoutPlan() = default;
44
49
  explicit WorkoutPlan(std::string id, WorkoutActivityType activityType): id(id), activityType(activityType) {}
50
+
51
+ public:
52
+ friend bool operator==(const WorkoutPlan& lhs, const WorkoutPlan& rhs) = default;
45
53
  };
46
54
 
47
55
  } // namespace margelo::nitro::healthkit
@@ -54,14 +62,14 @@ namespace margelo::nitro {
54
62
  static inline margelo::nitro::healthkit::WorkoutPlan fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
55
63
  jsi::Object obj = arg.asObject(runtime);
56
64
  return margelo::nitro::healthkit::WorkoutPlan(
57
- JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "id")),
58
- JSIConverter<margelo::nitro::healthkit::WorkoutActivityType>::fromJSI(runtime, obj.getProperty(runtime, "activityType"))
65
+ JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "id"))),
66
+ JSIConverter<margelo::nitro::healthkit::WorkoutActivityType>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "activityType")))
59
67
  );
60
68
  }
61
69
  static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::healthkit::WorkoutPlan& arg) {
62
70
  jsi::Object obj(runtime);
63
- obj.setProperty(runtime, "id", JSIConverter<std::string>::toJSI(runtime, arg.id));
64
- obj.setProperty(runtime, "activityType", JSIConverter<margelo::nitro::healthkit::WorkoutActivityType>::toJSI(runtime, arg.activityType));
71
+ obj.setProperty(runtime, PropNameIDCache::get(runtime, "id"), JSIConverter<std::string>::toJSI(runtime, arg.id));
72
+ obj.setProperty(runtime, PropNameIDCache::get(runtime, "activityType"), JSIConverter<margelo::nitro::healthkit::WorkoutActivityType>::toJSI(runtime, arg.activityType));
65
73
  return obj;
66
74
  }
67
75
  static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
@@ -72,8 +80,8 @@ namespace margelo::nitro {
72
80
  if (!nitro::isPlainObject(runtime, obj)) {
73
81
  return false;
74
82
  }
75
- if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "id"))) return false;
76
- if (!JSIConverter<margelo::nitro::healthkit::WorkoutActivityType>::canConvert(runtime, obj.getProperty(runtime, "activityType"))) return false;
83
+ if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "id")))) return false;
84
+ if (!JSIConverter<margelo::nitro::healthkit::WorkoutActivityType>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "activityType")))) return false;
77
85
  return true;
78
86
  }
79
87
  };
@@ -2,7 +2,7 @@
2
2
  /// WorkoutQueryOptions.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 `FilterForWorkouts` to properly resolve imports.
27
32
  namespace margelo::nitro::healthkit { struct FilterForWorkouts; }
@@ -34,7 +39,7 @@ namespace margelo::nitro::healthkit {
34
39
  /**
35
40
  * A struct which can be represented as a JavaScript object (WorkoutQueryOptions).
36
41
  */
37
- struct WorkoutQueryOptions {
42
+ struct WorkoutQueryOptions final {
38
43
  public:
39
44
  std::optional<FilterForWorkouts> filter SWIFT_PRIVATE;
40
45
  double limit SWIFT_PRIVATE;
@@ -43,6 +48,9 @@ namespace margelo::nitro::healthkit {
43
48
  public:
44
49
  WorkoutQueryOptions() = default;
45
50
  explicit WorkoutQueryOptions(std::optional<FilterForWorkouts> filter, double limit, std::optional<bool> ascending): filter(filter), limit(limit), ascending(ascending) {}
51
+
52
+ public:
53
+ friend bool operator==(const WorkoutQueryOptions& lhs, const WorkoutQueryOptions& rhs) = default;
46
54
  };
47
55
 
48
56
  } // namespace margelo::nitro::healthkit
@@ -55,16 +63,16 @@ namespace margelo::nitro {
55
63
  static inline margelo::nitro::healthkit::WorkoutQueryOptions fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
56
64
  jsi::Object obj = arg.asObject(runtime);
57
65
  return margelo::nitro::healthkit::WorkoutQueryOptions(
58
- JSIConverter<std::optional<margelo::nitro::healthkit::FilterForWorkouts>>::fromJSI(runtime, obj.getProperty(runtime, "filter")),
59
- JSIConverter<double>::fromJSI(runtime, obj.getProperty(runtime, "limit")),
60
- JSIConverter<std::optional<bool>>::fromJSI(runtime, obj.getProperty(runtime, "ascending"))
66
+ JSIConverter<std::optional<margelo::nitro::healthkit::FilterForWorkouts>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "filter"))),
67
+ JSIConverter<double>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "limit"))),
68
+ JSIConverter<std::optional<bool>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "ascending")))
61
69
  );
62
70
  }
63
71
  static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::healthkit::WorkoutQueryOptions& arg) {
64
72
  jsi::Object obj(runtime);
65
- obj.setProperty(runtime, "filter", JSIConverter<std::optional<margelo::nitro::healthkit::FilterForWorkouts>>::toJSI(runtime, arg.filter));
66
- obj.setProperty(runtime, "limit", JSIConverter<double>::toJSI(runtime, arg.limit));
67
- obj.setProperty(runtime, "ascending", JSIConverter<std::optional<bool>>::toJSI(runtime, arg.ascending));
73
+ obj.setProperty(runtime, PropNameIDCache::get(runtime, "filter"), JSIConverter<std::optional<margelo::nitro::healthkit::FilterForWorkouts>>::toJSI(runtime, arg.filter));
74
+ obj.setProperty(runtime, PropNameIDCache::get(runtime, "limit"), JSIConverter<double>::toJSI(runtime, arg.limit));
75
+ obj.setProperty(runtime, PropNameIDCache::get(runtime, "ascending"), JSIConverter<std::optional<bool>>::toJSI(runtime, arg.ascending));
68
76
  return obj;
69
77
  }
70
78
  static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
@@ -75,9 +83,9 @@ namespace margelo::nitro {
75
83
  if (!nitro::isPlainObject(runtime, obj)) {
76
84
  return false;
77
85
  }
78
- if (!JSIConverter<std::optional<margelo::nitro::healthkit::FilterForWorkouts>>::canConvert(runtime, obj.getProperty(runtime, "filter"))) return false;
79
- if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, "limit"))) return false;
80
- if (!JSIConverter<std::optional<bool>>::canConvert(runtime, obj.getProperty(runtime, "ascending"))) return false;
86
+ if (!JSIConverter<std::optional<margelo::nitro::healthkit::FilterForWorkouts>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "filter")))) return false;
87
+ if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "limit")))) return false;
88
+ if (!JSIConverter<std::optional<bool>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "ascending")))) return false;
81
89
  return true;
82
90
  }
83
91
  };
@@ -2,7 +2,7 @@
2
2
  /// WorkoutQueryOptionsWithAnchor.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 `FilterForWorkouts` to properly resolve imports.
27
32
  namespace margelo::nitro::healthkit { struct FilterForWorkouts; }
@@ -35,7 +40,7 @@ namespace margelo::nitro::healthkit {
35
40
  /**
36
41
  * A struct which can be represented as a JavaScript object (WorkoutQueryOptionsWithAnchor).
37
42
  */
38
- struct WorkoutQueryOptionsWithAnchor {
43
+ struct WorkoutQueryOptionsWithAnchor final {
39
44
  public:
40
45
  std::optional<FilterForWorkouts> filter SWIFT_PRIVATE;
41
46
  double limit SWIFT_PRIVATE;
@@ -44,6 +49,9 @@ namespace margelo::nitro::healthkit {
44
49
  public:
45
50
  WorkoutQueryOptionsWithAnchor() = default;
46
51
  explicit WorkoutQueryOptionsWithAnchor(std::optional<FilterForWorkouts> filter, double limit, std::optional<std::string> anchor): filter(filter), limit(limit), anchor(anchor) {}
52
+
53
+ public:
54
+ friend bool operator==(const WorkoutQueryOptionsWithAnchor& lhs, const WorkoutQueryOptionsWithAnchor& rhs) = default;
47
55
  };
48
56
 
49
57
  } // namespace margelo::nitro::healthkit
@@ -56,16 +64,16 @@ namespace margelo::nitro {
56
64
  static inline margelo::nitro::healthkit::WorkoutQueryOptionsWithAnchor fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
57
65
  jsi::Object obj = arg.asObject(runtime);
58
66
  return margelo::nitro::healthkit::WorkoutQueryOptionsWithAnchor(
59
- JSIConverter<std::optional<margelo::nitro::healthkit::FilterForWorkouts>>::fromJSI(runtime, obj.getProperty(runtime, "filter")),
60
- JSIConverter<double>::fromJSI(runtime, obj.getProperty(runtime, "limit")),
61
- JSIConverter<std::optional<std::string>>::fromJSI(runtime, obj.getProperty(runtime, "anchor"))
67
+ JSIConverter<std::optional<margelo::nitro::healthkit::FilterForWorkouts>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "filter"))),
68
+ JSIConverter<double>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "limit"))),
69
+ JSIConverter<std::optional<std::string>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "anchor")))
62
70
  );
63
71
  }
64
72
  static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::healthkit::WorkoutQueryOptionsWithAnchor& arg) {
65
73
  jsi::Object obj(runtime);
66
- obj.setProperty(runtime, "filter", JSIConverter<std::optional<margelo::nitro::healthkit::FilterForWorkouts>>::toJSI(runtime, arg.filter));
67
- obj.setProperty(runtime, "limit", JSIConverter<double>::toJSI(runtime, arg.limit));
68
- obj.setProperty(runtime, "anchor", JSIConverter<std::optional<std::string>>::toJSI(runtime, arg.anchor));
74
+ obj.setProperty(runtime, PropNameIDCache::get(runtime, "filter"), JSIConverter<std::optional<margelo::nitro::healthkit::FilterForWorkouts>>::toJSI(runtime, arg.filter));
75
+ obj.setProperty(runtime, PropNameIDCache::get(runtime, "limit"), JSIConverter<double>::toJSI(runtime, arg.limit));
76
+ obj.setProperty(runtime, PropNameIDCache::get(runtime, "anchor"), JSIConverter<std::optional<std::string>>::toJSI(runtime, arg.anchor));
69
77
  return obj;
70
78
  }
71
79
  static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
@@ -76,9 +84,9 @@ namespace margelo::nitro {
76
84
  if (!nitro::isPlainObject(runtime, obj)) {
77
85
  return false;
78
86
  }
79
- if (!JSIConverter<std::optional<margelo::nitro::healthkit::FilterForWorkouts>>::canConvert(runtime, obj.getProperty(runtime, "filter"))) return false;
80
- if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, "limit"))) return false;
81
- if (!JSIConverter<std::optional<std::string>>::canConvert(runtime, obj.getProperty(runtime, "anchor"))) return false;
87
+ if (!JSIConverter<std::optional<margelo::nitro::healthkit::FilterForWorkouts>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "filter")))) return false;
88
+ if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "limit")))) return false;
89
+ if (!JSIConverter<std::optional<std::string>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "anchor")))) return false;
82
90
  return true;
83
91
  }
84
92
  };
@@ -2,7 +2,7 @@
2
2
  /// WorkoutRoute.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 `WorkoutRouteLocation` to properly resolve imports.
27
32
  namespace margelo::nitro::healthkit { struct WorkoutRouteLocation; }
@@ -36,7 +41,7 @@ namespace margelo::nitro::healthkit {
36
41
  /**
37
42
  * A struct which can be represented as a JavaScript object (WorkoutRoute).
38
43
  */
39
- struct WorkoutRoute {
44
+ struct WorkoutRoute final {
40
45
  public:
41
46
  std::vector<WorkoutRouteLocation> locations SWIFT_PRIVATE;
42
47
  std::optional<std::string> HKMetadataKeySyncIdentifier SWIFT_PRIVATE;
@@ -45,6 +50,9 @@ namespace margelo::nitro::healthkit {
45
50
  public:
46
51
  WorkoutRoute() = default;
47
52
  explicit WorkoutRoute(std::vector<WorkoutRouteLocation> locations, std::optional<std::string> HKMetadataKeySyncIdentifier, std::optional<double> HKMetadataKeySyncVersion): locations(locations), HKMetadataKeySyncIdentifier(HKMetadataKeySyncIdentifier), HKMetadataKeySyncVersion(HKMetadataKeySyncVersion) {}
53
+
54
+ public:
55
+ friend bool operator==(const WorkoutRoute& lhs, const WorkoutRoute& rhs) = default;
48
56
  };
49
57
 
50
58
  } // namespace margelo::nitro::healthkit
@@ -57,16 +65,16 @@ namespace margelo::nitro {
57
65
  static inline margelo::nitro::healthkit::WorkoutRoute fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
58
66
  jsi::Object obj = arg.asObject(runtime);
59
67
  return margelo::nitro::healthkit::WorkoutRoute(
60
- JSIConverter<std::vector<margelo::nitro::healthkit::WorkoutRouteLocation>>::fromJSI(runtime, obj.getProperty(runtime, "locations")),
61
- JSIConverter<std::optional<std::string>>::fromJSI(runtime, obj.getProperty(runtime, "HKMetadataKeySyncIdentifier")),
62
- JSIConverter<std::optional<double>>::fromJSI(runtime, obj.getProperty(runtime, "HKMetadataKeySyncVersion"))
68
+ JSIConverter<std::vector<margelo::nitro::healthkit::WorkoutRouteLocation>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "locations"))),
69
+ JSIConverter<std::optional<std::string>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "HKMetadataKeySyncIdentifier"))),
70
+ JSIConverter<std::optional<double>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "HKMetadataKeySyncVersion")))
63
71
  );
64
72
  }
65
73
  static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::healthkit::WorkoutRoute& arg) {
66
74
  jsi::Object obj(runtime);
67
- obj.setProperty(runtime, "locations", JSIConverter<std::vector<margelo::nitro::healthkit::WorkoutRouteLocation>>::toJSI(runtime, arg.locations));
68
- obj.setProperty(runtime, "HKMetadataKeySyncIdentifier", JSIConverter<std::optional<std::string>>::toJSI(runtime, arg.HKMetadataKeySyncIdentifier));
69
- obj.setProperty(runtime, "HKMetadataKeySyncVersion", JSIConverter<std::optional<double>>::toJSI(runtime, arg.HKMetadataKeySyncVersion));
75
+ obj.setProperty(runtime, PropNameIDCache::get(runtime, "locations"), JSIConverter<std::vector<margelo::nitro::healthkit::WorkoutRouteLocation>>::toJSI(runtime, arg.locations));
76
+ obj.setProperty(runtime, PropNameIDCache::get(runtime, "HKMetadataKeySyncIdentifier"), JSIConverter<std::optional<std::string>>::toJSI(runtime, arg.HKMetadataKeySyncIdentifier));
77
+ obj.setProperty(runtime, PropNameIDCache::get(runtime, "HKMetadataKeySyncVersion"), JSIConverter<std::optional<double>>::toJSI(runtime, arg.HKMetadataKeySyncVersion));
70
78
  return obj;
71
79
  }
72
80
  static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
@@ -77,9 +85,9 @@ namespace margelo::nitro {
77
85
  if (!nitro::isPlainObject(runtime, obj)) {
78
86
  return false;
79
87
  }
80
- if (!JSIConverter<std::vector<margelo::nitro::healthkit::WorkoutRouteLocation>>::canConvert(runtime, obj.getProperty(runtime, "locations"))) return false;
81
- if (!JSIConverter<std::optional<std::string>>::canConvert(runtime, obj.getProperty(runtime, "HKMetadataKeySyncIdentifier"))) return false;
82
- if (!JSIConverter<std::optional<double>>::canConvert(runtime, obj.getProperty(runtime, "HKMetadataKeySyncVersion"))) return false;
88
+ if (!JSIConverter<std::vector<margelo::nitro::healthkit::WorkoutRouteLocation>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "locations")))) return false;
89
+ if (!JSIConverter<std::optional<std::string>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "HKMetadataKeySyncIdentifier")))) return false;
90
+ if (!JSIConverter<std::optional<double>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "HKMetadataKeySyncVersion")))) return false;
83
91
  return true;
84
92
  }
85
93
  };