@kingstinct/react-native-healthkit 12.1.2 → 12.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (266) hide show
  1. package/ios/CategoryTypeModule.swift +49 -97
  2. package/ios/CharacteristicTypeModule.swift +77 -63
  3. package/ios/CoreModule.swift +324 -280
  4. package/ios/CorrelationTypeModule.swift +192 -144
  5. package/ios/ElectrocardiogramModule.swift +185 -194
  6. package/ios/HeartbeatSeriesModule.swift +123 -171
  7. package/ios/Helpers.swift +312 -571
  8. package/ios/MedicationModule.swift +259 -0
  9. package/ios/PredicateHelpers.swift +334 -0
  10. package/ios/QuantityTypeModule.swift +297 -378
  11. package/ios/Serializers.swift +273 -210
  12. package/ios/SourceProxy.swift +2 -2
  13. package/ios/StateOfMindModule.swift +179 -125
  14. package/ios/WorkoutProxy.swift +235 -112
  15. package/ios/WorkoutsModule.swift +214 -262
  16. package/lib/commonjs/healthkit.ios.js +22 -2
  17. package/lib/commonjs/healthkit.js +35 -5
  18. package/lib/commonjs/hooks/useStatisticsForQuantity.js +1 -1
  19. package/lib/commonjs/hooks/useSubscribeToCategorySamples.js +20 -0
  20. package/lib/commonjs/modules.js +2 -1
  21. package/lib/commonjs/specs/MedicationModule.nitro.js +27 -0
  22. package/lib/commonjs/types/Constants.js +2 -1
  23. package/lib/commonjs/types/QuantityType.js +8 -1
  24. package/lib/commonjs/types/QueryOptions.js +18 -0
  25. package/lib/commonjs/types/WeatherCondition.js +32 -32
  26. package/lib/commonjs/types/Workouts.js +1 -50
  27. package/lib/commonjs/utils/getCategorySampleById.js +1 -1
  28. package/lib/commonjs/utils/getQuantitySampleById.js +1 -1
  29. package/lib/commonjs/utils/getWorkoutById.js +1 -1
  30. package/lib/commonjs/utils/subscribeToCategorySamples.js +29 -0
  31. package/lib/commonjs/utils/subscribeToQuantitySamples.js +8 -25
  32. package/lib/module/healthkit.ios.js +20 -2
  33. package/lib/module/healthkit.js +32 -2
  34. package/lib/module/hooks/useStatisticsForQuantity.js +1 -1
  35. package/lib/module/hooks/useSubscribeToCategorySamples.js +17 -0
  36. package/lib/module/modules.js +1 -0
  37. package/lib/module/specs/MedicationModule.nitro.js +26 -0
  38. package/lib/module/types/Constants.js +1 -0
  39. package/lib/module/types/QuantityType.js +7 -0
  40. package/lib/module/types/QueryOptions.js +17 -1
  41. package/lib/module/types/WeatherCondition.js +31 -31
  42. package/lib/module/types/Workouts.js +0 -49
  43. package/lib/module/utils/getCategorySampleById.js +1 -1
  44. package/lib/module/utils/getQuantitySampleById.js +1 -1
  45. package/lib/module/utils/getWorkoutById.js +1 -1
  46. package/lib/module/utils/subscribeToCategorySamples.js +26 -0
  47. package/lib/module/utils/subscribeToQuantitySamples.js +8 -25
  48. package/lib/typescript/healthkit.d.ts +18 -9
  49. package/lib/typescript/healthkit.ios.d.ts +33 -15
  50. package/lib/typescript/hooks/useSubscribeToCategorySamples.d.ts +3 -0
  51. package/lib/typescript/modules.d.ts +2 -0
  52. package/lib/typescript/specs/CategoryTypeModule.nitro.d.ts +2 -2
  53. package/lib/typescript/specs/CoreModule.nitro.d.ts +2 -1
  54. package/lib/typescript/specs/CorrelationTypeModule.nitro.d.ts +4 -2
  55. package/lib/typescript/specs/ElectrocardiogramModule.nitro.d.ts +1 -1
  56. package/lib/typescript/specs/HeartbeatSeriesModule.nitro.d.ts +1 -1
  57. package/lib/typescript/specs/MedicationModule.nitro.d.ts +56 -0
  58. package/lib/typescript/specs/QuantityTypeModule.nitro.d.ts +4 -4
  59. package/lib/typescript/specs/StateOfMindModule.nitro.d.ts +4 -3
  60. package/lib/typescript/types/CategoryType.d.ts +10 -20
  61. package/lib/typescript/types/Constants.d.ts +1 -0
  62. package/lib/typescript/types/CorrelationType.d.ts +8 -10
  63. package/lib/typescript/types/ElectrocardiogramSample.d.ts +2 -12
  64. package/lib/typescript/types/HeartbeatSeries.d.ts +2 -14
  65. package/lib/typescript/types/QuantitySample.d.ts +2 -8
  66. package/lib/typescript/types/QuantityType.d.ts +7 -8
  67. package/lib/typescript/types/QuantityTypeIdentifier.d.ts +23 -23
  68. package/lib/typescript/types/QueryOptions.d.ts +43 -28
  69. package/lib/typescript/types/Shared.d.ts +52 -7
  70. package/lib/typescript/types/StateOfMind.d.ts +7 -10
  71. package/lib/typescript/types/Subscriptions.d.ts +12 -3
  72. package/lib/typescript/types/WeatherCondition.d.ts +1 -1
  73. package/lib/typescript/types/Workouts.d.ts +28 -81
  74. package/lib/typescript/utils/subscribeToCategorySamples.d.ts +5 -0
  75. package/nitrogen/generated/ios/ReactNativeHealthkit-Swift-Cxx-Bridge.cpp +57 -0
  76. package/nitrogen/generated/ios/ReactNativeHealthkit-Swift-Cxx-Bridge.hpp +592 -389
  77. package/nitrogen/generated/ios/ReactNativeHealthkit-Swift-Cxx-Umbrella.hpp +65 -30
  78. package/nitrogen/generated/ios/ReactNativeHealthkitAutolinking.mm +8 -0
  79. package/nitrogen/generated/ios/ReactNativeHealthkitAutolinking.swift +15 -0
  80. package/nitrogen/generated/ios/c++/HybridCategoryTypeModuleSpecSwift.hpp +32 -26
  81. package/nitrogen/generated/ios/c++/HybridCoreModuleSpecSwift.hpp +36 -37
  82. package/nitrogen/generated/ios/c++/HybridCorrelationTypeModuleSpecSwift.hpp +55 -2
  83. package/nitrogen/generated/ios/c++/HybridElectrocardiogramModuleSpecSwift.hpp +36 -30
  84. package/nitrogen/generated/ios/c++/HybridHeartbeatSeriesModuleSpecSwift.hpp +35 -29
  85. package/nitrogen/generated/ios/c++/HybridMedicationModuleSpecSwift.cpp +11 -0
  86. package/nitrogen/generated/ios/c++/HybridMedicationModuleSpecSwift.hpp +181 -0
  87. package/nitrogen/generated/ios/c++/HybridQuantityTypeModuleSpecSwift.hpp +48 -42
  88. package/nitrogen/generated/ios/c++/HybridStateOfMindModuleSpecSwift.hpp +59 -36
  89. package/nitrogen/generated/ios/c++/HybridWorkoutProxySpecSwift.hpp +150 -29
  90. package/nitrogen/generated/ios/c++/HybridWorkoutsModuleSpecSwift.hpp +13 -28
  91. package/nitrogen/generated/ios/swift/AggregationStyle.swift +48 -0
  92. package/nitrogen/generated/ios/swift/CategorySample.swift +571 -24
  93. package/nitrogen/generated/ios/swift/ComparisonPredicateOperator.swift +2 -2
  94. package/nitrogen/generated/ios/swift/CorrelationSample.swift +640 -17
  95. package/nitrogen/generated/ios/swift/{PredicateWithStartAndEnd.swift → DateFilter.swift} +5 -5
  96. package/nitrogen/generated/ios/swift/ECGQueryOptionsWithAnchor.swift +11 -91
  97. package/nitrogen/generated/ios/swift/ECGQueryOptionsWithSortOrder.swift +11 -91
  98. package/nitrogen/generated/ios/swift/ElectrocardiogramSample.swift +570 -72
  99. package/nitrogen/generated/ios/swift/FilterForSamples.swift +349 -12
  100. package/nitrogen/generated/ios/swift/FilterForSamplesBase.swift +234 -0
  101. package/nitrogen/generated/ios/swift/FilterForWorkouts.swift +366 -0
  102. package/nitrogen/generated/ios/swift/FilterForWorkoutsBase.swift +240 -0
  103. package/nitrogen/generated/ios/swift/Func_void_MedicationDoseEventsWithAnchorResponse.swift +47 -0
  104. package/nitrogen/generated/ios/swift/Func_void_QueryCorrelationSamplesWithAnchorResponse.swift +47 -0
  105. package/nitrogen/generated/ios/swift/Func_void_StateOfMindSamplesWithAnchorResponse.swift +47 -0
  106. package/nitrogen/generated/ios/swift/Func_void_std__vector_MedicationDoseEvent_.swift +47 -0
  107. package/nitrogen/generated/ios/swift/Func_void_std__vector_UserAnnotatedMedication_.swift +47 -0
  108. package/nitrogen/generated/ios/swift/GeneralForm.swift +104 -0
  109. package/nitrogen/generated/ios/swift/HeartRateMotionContext.swift +44 -0
  110. package/nitrogen/generated/ios/swift/HeartbeatSeriesSample.swift +565 -37
  111. package/nitrogen/generated/ios/swift/HybridCategoryTypeModuleSpec.swift +1 -1
  112. package/nitrogen/generated/ios/swift/HybridCategoryTypeModuleSpec_cxx.swift +2 -2
  113. package/nitrogen/generated/ios/swift/HybridCoreModuleSpec.swift +2 -1
  114. package/nitrogen/generated/ios/swift/HybridCoreModuleSpec_cxx.swift +19 -31
  115. package/nitrogen/generated/ios/swift/HybridCorrelationTypeModuleSpec.swift +2 -1
  116. package/nitrogen/generated/ios/swift/HybridCorrelationTypeModuleSpec_cxx.swift +21 -2
  117. package/nitrogen/generated/ios/swift/HybridElectrocardiogramModuleSpec.swift +1 -1
  118. package/nitrogen/generated/ios/swift/HybridElectrocardiogramModuleSpec_cxx.swift +2 -2
  119. package/nitrogen/generated/ios/swift/HybridHeartbeatSeriesModuleSpec.swift +1 -1
  120. package/nitrogen/generated/ios/swift/HybridHeartbeatSeriesModuleSpec_cxx.swift +2 -2
  121. package/nitrogen/generated/ios/swift/HybridMedicationModuleSpec.swift +60 -0
  122. package/nitrogen/generated/ios/swift/HybridMedicationModuleSpec_cxx.swift +208 -0
  123. package/nitrogen/generated/ios/swift/HybridQuantityTypeModuleSpec.swift +2 -2
  124. package/nitrogen/generated/ios/swift/HybridQuantityTypeModuleSpec_cxx.swift +9 -43
  125. package/nitrogen/generated/ios/swift/HybridStateOfMindModuleSpec.swift +2 -1
  126. package/nitrogen/generated/ios/swift/HybridStateOfMindModuleSpec_cxx.swift +21 -2
  127. package/nitrogen/generated/ios/swift/HybridWorkoutProxySpec.swift +34 -6
  128. package/nitrogen/generated/ios/swift/HybridWorkoutProxySpec_cxx.swift +376 -36
  129. package/nitrogen/generated/ios/swift/InsulinDeliveryReason.swift +40 -0
  130. package/nitrogen/generated/ios/swift/MedicationConcept.swift +80 -0
  131. package/nitrogen/generated/ios/swift/MedicationDoseEvent.swift +781 -0
  132. package/nitrogen/generated/ios/swift/MedicationDoseEventLogStatus.swift +56 -0
  133. package/nitrogen/generated/ios/swift/MedicationDoseEventScheduleType.swift +40 -0
  134. package/nitrogen/generated/ios/swift/MedicationDoseEventsWithAnchorResponse.swift +81 -0
  135. package/nitrogen/generated/ios/swift/ObjectTypeIdentifier.swift +16 -16
  136. package/nitrogen/generated/ios/swift/PredicateWithMetadataKey.swift +7 -7
  137. package/nitrogen/generated/ios/swift/QuantitySample.swift +574 -27
  138. package/nitrogen/generated/ios/swift/QuantityTypeIdentifier.swift +16 -16
  139. package/nitrogen/generated/ios/swift/QueryCorrelationSamplesWithAnchorResponse.swift +81 -0
  140. package/nitrogen/generated/ios/swift/QueryOptionsWithAnchor.swift +11 -91
  141. package/nitrogen/generated/ios/swift/QueryOptionsWithAnchorAndUnit.swift +11 -91
  142. package/nitrogen/generated/ios/swift/QueryOptionsWithSortOrder.swift +11 -91
  143. package/nitrogen/generated/ios/swift/QueryOptionsWithSortOrderAndUnit.swift +11 -91
  144. package/nitrogen/generated/ios/swift/RelatedCoding.swift +76 -0
  145. package/nitrogen/generated/ios/swift/SampleType.swift +68 -0
  146. package/nitrogen/generated/ios/swift/SampleTypeIdentifier.swift +16 -16
  147. package/nitrogen/generated/ios/swift/SampleTypeIdentifierWriteable.swift +0 -16
  148. package/nitrogen/generated/ios/swift/StateOfMindSample.swift +586 -58
  149. package/nitrogen/generated/ios/swift/StateOfMindSamplesWithAnchorResponse.swift +81 -0
  150. package/nitrogen/generated/ios/swift/StatisticsQueryOptions.swift +7 -75
  151. package/nitrogen/generated/ios/swift/UserAnnotatedMedication.swift +87 -0
  152. package/nitrogen/generated/ios/swift/WeatherCondition.swift +144 -0
  153. package/nitrogen/generated/ios/swift/WorkoutQueryOptions.swift +11 -105
  154. package/nitrogen/generated/ios/swift/WorkoutQueryOptionsWithAnchor.swift +11 -105
  155. package/nitrogen/generated/ios/swift/WorkoutSample.swift +751 -78
  156. package/nitrogen/generated/shared/c++/AggregationStyle.hpp +64 -0
  157. package/nitrogen/generated/shared/c++/CategorySample.hpp +126 -23
  158. package/nitrogen/generated/shared/c++/CorrelationSample.hpp +134 -12
  159. package/nitrogen/generated/shared/c++/{PredicateWithStartAndEnd.hpp → DateFilter.hpp} +10 -10
  160. package/nitrogen/generated/shared/c++/ECGQueryOptionsWithAnchor.hpp +12 -31
  161. package/nitrogen/generated/shared/c++/ECGQueryOptionsWithSortOrder.hpp +12 -31
  162. package/nitrogen/generated/shared/c++/ElectrocardiogramSample.hpp +135 -36
  163. package/nitrogen/generated/shared/c++/FilterForSamples.hpp +124 -0
  164. package/nitrogen/generated/shared/c++/FilterForSamplesBase.hpp +109 -0
  165. package/nitrogen/generated/shared/c++/FilterForWorkouts.hpp +131 -0
  166. package/nitrogen/generated/shared/c++/FilterForWorkoutsBase.hpp +116 -0
  167. package/nitrogen/generated/shared/c++/GeneralForm.hpp +140 -0
  168. package/nitrogen/generated/shared/c++/HeartRateMotionContext.hpp +67 -0
  169. package/nitrogen/generated/shared/c++/HeartbeatSeriesSample.hpp +131 -28
  170. package/nitrogen/generated/shared/c++/HybridCategoryTypeModuleSpec.hpp +1 -2
  171. package/nitrogen/generated/shared/c++/HybridCoreModuleSpec.cpp +1 -0
  172. package/nitrogen/generated/shared/c++/HybridCoreModuleSpec.hpp +10 -28
  173. package/nitrogen/generated/shared/c++/HybridCorrelationTypeModuleSpec.cpp +1 -0
  174. package/nitrogen/generated/shared/c++/HybridCorrelationTypeModuleSpec.hpp +11 -1
  175. package/nitrogen/generated/shared/c++/HybridElectrocardiogramModuleSpec.hpp +1 -2
  176. package/nitrogen/generated/shared/c++/HybridHeartbeatSeriesModuleSpec.hpp +1 -2
  177. package/nitrogen/generated/shared/c++/HybridMedicationModuleSpec.cpp +24 -0
  178. package/nitrogen/generated/shared/c++/HybridMedicationModuleSpec.hpp +80 -0
  179. package/nitrogen/generated/shared/c++/HybridQuantityTypeModuleSpec.cpp +1 -1
  180. package/nitrogen/generated/shared/c++/HybridQuantityTypeModuleSpec.hpp +6 -25
  181. package/nitrogen/generated/shared/c++/HybridStateOfMindModuleSpec.cpp +1 -0
  182. package/nitrogen/generated/shared/c++/HybridStateOfMindModuleSpec.hpp +9 -2
  183. package/nitrogen/generated/shared/c++/HybridWorkoutProxySpec.cpp +33 -5
  184. package/nitrogen/generated/shared/c++/HybridWorkoutProxySpec.hpp +56 -16
  185. package/nitrogen/generated/shared/c++/InsulinDeliveryReason.hpp +62 -0
  186. package/nitrogen/generated/shared/c++/MedicationConcept.hpp +93 -0
  187. package/nitrogen/generated/shared/c++/MedicationDoseEvent.hpp +240 -0
  188. package/nitrogen/generated/shared/c++/MedicationDoseEventLogStatus.hpp +66 -0
  189. package/nitrogen/generated/shared/c++/MedicationDoseEventScheduleType.hpp +62 -0
  190. package/nitrogen/generated/shared/c++/MedicationDoseEventsWithAnchorResponse.hpp +89 -0
  191. package/nitrogen/generated/shared/c++/ObjectTypeIdentifier.hpp +105 -105
  192. package/nitrogen/generated/shared/c++/PredicateWithMetadataKey.hpp +8 -8
  193. package/nitrogen/generated/shared/c++/QuantitySample.hpp +130 -27
  194. package/nitrogen/generated/shared/c++/QuantityTypeIdentifier.hpp +105 -105
  195. package/nitrogen/generated/shared/c++/QueryCorrelationSamplesWithAnchorResponse.hpp +89 -0
  196. package/nitrogen/generated/shared/c++/QueryOptionsWithAnchor.hpp +12 -31
  197. package/nitrogen/generated/shared/c++/QueryOptionsWithAnchorAndUnit.hpp +12 -31
  198. package/nitrogen/generated/shared/c++/QueryOptionsWithSortOrder.hpp +12 -31
  199. package/nitrogen/generated/shared/c++/QueryOptionsWithSortOrderAndUnit.hpp +12 -31
  200. package/nitrogen/generated/shared/c++/RelatedCoding.hpp +84 -0
  201. package/nitrogen/generated/shared/c++/SampleType.hpp +87 -0
  202. package/nitrogen/generated/shared/c++/SampleTypeIdentifier.hpp +105 -105
  203. package/nitrogen/generated/shared/c++/SampleTypeIdentifierWriteable.hpp +105 -121
  204. package/nitrogen/generated/shared/c++/StateOfMindSample.hpp +139 -36
  205. package/nitrogen/generated/shared/c++/StateOfMindSamplesWithAnchorResponse.hpp +89 -0
  206. package/nitrogen/generated/shared/c++/StatisticsQueryOptions.hpp +8 -27
  207. package/nitrogen/generated/shared/c++/UserAnnotatedMedication.hpp +90 -0
  208. package/nitrogen/generated/shared/c++/WeatherCondition.hpp +88 -0
  209. package/nitrogen/generated/shared/c++/WorkoutQueryOptions.hpp +12 -37
  210. package/nitrogen/generated/shared/c++/WorkoutQueryOptionsWithAnchor.hpp +12 -37
  211. package/nitrogen/generated/shared/c++/WorkoutSample.hpp +159 -35
  212. package/package.json +1 -1
  213. package/src/healthkit.ios.ts +30 -0
  214. package/src/healthkit.ts +68 -3
  215. package/src/hooks/useStatisticsForQuantity.ts +1 -1
  216. package/src/hooks/useSubscribeToCategorySamples.ts +31 -0
  217. package/src/modules.ts +4 -0
  218. package/src/specs/CategoryTypeModule.nitro.ts +2 -2
  219. package/src/specs/CoreModule.nitro.ts +3 -0
  220. package/src/specs/CorrelationTypeModule.nitro.ts +11 -3
  221. package/src/specs/ElectrocardiogramModule.nitro.ts +1 -1
  222. package/src/specs/HeartbeatSeriesModule.nitro.ts +1 -1
  223. package/src/specs/MedicationModule.nitro.ts +140 -0
  224. package/src/specs/QuantityTypeModule.nitro.ts +4 -7
  225. package/src/specs/StateOfMindModule.nitro.ts +10 -2
  226. package/src/types/CategoryType.ts +15 -22
  227. package/src/types/Constants.ts +3 -0
  228. package/src/types/CorrelationType.ts +10 -15
  229. package/src/types/ElectrocardiogramSample.ts +2 -14
  230. package/src/types/HeartbeatSeries.ts +2 -15
  231. package/src/types/QuantitySample.ts +2 -8
  232. package/src/types/QuantityType.ts +8 -17
  233. package/src/types/QuantityTypeIdentifier.ts +25 -25
  234. package/src/types/QueryOptions.ts +54 -43
  235. package/src/types/Shared.ts +74 -17
  236. package/src/types/StateOfMind.ts +8 -10
  237. package/src/types/Subscriptions.ts +19 -3
  238. package/src/types/WeatherCondition.ts +1 -1
  239. package/src/types/Workouts.ts +28 -91
  240. package/src/utils/getCategorySampleById.ts +1 -1
  241. package/src/utils/getQuantitySampleById.ts +1 -1
  242. package/src/utils/getWorkoutById.ts +1 -2
  243. package/src/utils/subscribeToCategorySamples.ts +38 -0
  244. package/src/utils/subscribeToQuantitySamples.ts +12 -37
  245. package/nitrogen/generated/ios/swift/FilterForSamplesAnd.swift +0 -94
  246. package/nitrogen/generated/ios/swift/FilterForSamplesOr.swift +0 -94
  247. package/nitrogen/generated/ios/swift/PredicateForSamples.swift +0 -21
  248. package/nitrogen/generated/ios/swift/PredicateForWorkouts.swift +0 -23
  249. package/nitrogen/generated/ios/swift/PredicateForWorkoutsAnd.swift +0 -108
  250. package/nitrogen/generated/ios/swift/PredicateForWorkoutsOr.swift +0 -108
  251. package/nitrogen/generated/ios/swift/PredicateFromWorkout.swift +0 -45
  252. package/nitrogen/generated/ios/swift/PredicateWithMetadataOperator.swift +0 -48
  253. package/nitrogen/generated/ios/swift/PredicateWithUUID.swift +0 -35
  254. package/nitrogen/generated/ios/swift/PredicateWithUUIDs.swift +0 -47
  255. package/nitrogen/generated/ios/swift/Variant_PredicateWithUUID_PredicateWithUUIDs_PredicateWithMetadataKey_PredicateWithStartAndEnd_PredicateFromWorkout_FilterForSamplesAnd_FilterForSamplesOr.swift +0 -23
  256. package/nitrogen/generated/ios/swift/Variant_PredicateWithUUID_PredicateWithUUIDs_PredicateWithMetadataKey_PredicateWithStartAndEnd_PredicateFromWorkout_WorkoutActivityTypePredicate_WorkoutDurationPredicate_PredicateForWorkoutsOr_PredicateForWorkoutsAnd.swift +0 -25
  257. package/nitrogen/generated/ios/swift/WorkoutActivityTypePredicate.swift +0 -35
  258. package/nitrogen/generated/shared/c++/FilterForSamplesAnd.hpp +0 -90
  259. package/nitrogen/generated/shared/c++/FilterForSamplesOr.hpp +0 -90
  260. package/nitrogen/generated/shared/c++/PredicateForWorkoutsAnd.hpp +0 -96
  261. package/nitrogen/generated/shared/c++/PredicateForWorkoutsOr.hpp +0 -96
  262. package/nitrogen/generated/shared/c++/PredicateFromWorkout.hpp +0 -77
  263. package/nitrogen/generated/shared/c++/PredicateWithMetadataOperator.hpp +0 -84
  264. package/nitrogen/generated/shared/c++/PredicateWithUUID.hpp +0 -75
  265. package/nitrogen/generated/shared/c++/PredicateWithUUIDs.hpp +0 -76
  266. package/nitrogen/generated/shared/c++/WorkoutActivityTypePredicate.hpp +0 -76
@@ -1,90 +0,0 @@
1
- ///
2
- /// FilterForSamplesOr.hpp
3
- /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
- /// https://github.com/mrousavy/nitro
5
- /// Copyright © 2025 Marc Rousavy @ Margelo
6
- ///
7
-
8
- #pragma once
9
-
10
- #if __has_include(<NitroModules/JSIConverter.hpp>)
11
- #include <NitroModules/JSIConverter.hpp>
12
- #else
13
- #error NitroModules cannot be found! Are you sure you installed NitroModules properly?
14
- #endif
15
- #if __has_include(<NitroModules/NitroDefines.hpp>)
16
- #include <NitroModules/NitroDefines.hpp>
17
- #else
18
- #error NitroModules cannot be found! Are you sure you installed NitroModules properly?
19
- #endif
20
- #if __has_include(<NitroModules/JSIHelpers.hpp>)
21
- #include <NitroModules/JSIHelpers.hpp>
22
- #else
23
- #error NitroModules cannot be found! Are you sure you installed NitroModules properly?
24
- #endif
25
-
26
- // Forward declaration of `PredicateWithUUID` to properly resolve imports.
27
- namespace margelo::nitro::healthkit { struct PredicateWithUUID; }
28
- // Forward declaration of `PredicateWithUUIDs` to properly resolve imports.
29
- namespace margelo::nitro::healthkit { struct PredicateWithUUIDs; }
30
- // Forward declaration of `PredicateWithMetadataKey` to properly resolve imports.
31
- namespace margelo::nitro::healthkit { struct PredicateWithMetadataKey; }
32
- // Forward declaration of `PredicateWithStartAndEnd` to properly resolve imports.
33
- namespace margelo::nitro::healthkit { struct PredicateWithStartAndEnd; }
34
- // Forward declaration of `PredicateFromWorkout` to properly resolve imports.
35
- namespace margelo::nitro::healthkit { struct PredicateFromWorkout; }
36
-
37
- #include "PredicateWithUUID.hpp"
38
- #include "PredicateWithUUIDs.hpp"
39
- #include "PredicateWithMetadataKey.hpp"
40
- #include "PredicateWithStartAndEnd.hpp"
41
- #include "PredicateFromWorkout.hpp"
42
- #include <variant>
43
- #include <vector>
44
-
45
- namespace margelo::nitro::healthkit {
46
-
47
- /**
48
- * A struct which can be represented as a JavaScript object (FilterForSamplesOr).
49
- */
50
- struct FilterForSamplesOr {
51
- public:
52
- std::vector<std::variant<PredicateWithUUID, PredicateWithUUIDs, PredicateWithMetadataKey, PredicateWithStartAndEnd, PredicateFromWorkout>> OR SWIFT_PRIVATE;
53
-
54
- public:
55
- FilterForSamplesOr() = default;
56
- explicit FilterForSamplesOr(std::vector<std::variant<PredicateWithUUID, PredicateWithUUIDs, PredicateWithMetadataKey, PredicateWithStartAndEnd, PredicateFromWorkout>> OR): OR(OR) {}
57
- };
58
-
59
- } // namespace margelo::nitro::healthkit
60
-
61
- namespace margelo::nitro {
62
-
63
- // C++ FilterForSamplesOr <> JS FilterForSamplesOr (object)
64
- template <>
65
- struct JSIConverter<margelo::nitro::healthkit::FilterForSamplesOr> final {
66
- static inline margelo::nitro::healthkit::FilterForSamplesOr fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
67
- jsi::Object obj = arg.asObject(runtime);
68
- return margelo::nitro::healthkit::FilterForSamplesOr(
69
- JSIConverter<std::vector<std::variant<margelo::nitro::healthkit::PredicateWithUUID, margelo::nitro::healthkit::PredicateWithUUIDs, margelo::nitro::healthkit::PredicateWithMetadataKey, margelo::nitro::healthkit::PredicateWithStartAndEnd, margelo::nitro::healthkit::PredicateFromWorkout>>>::fromJSI(runtime, obj.getProperty(runtime, "OR"))
70
- );
71
- }
72
- static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::healthkit::FilterForSamplesOr& arg) {
73
- jsi::Object obj(runtime);
74
- obj.setProperty(runtime, "OR", JSIConverter<std::vector<std::variant<margelo::nitro::healthkit::PredicateWithUUID, margelo::nitro::healthkit::PredicateWithUUIDs, margelo::nitro::healthkit::PredicateWithMetadataKey, margelo::nitro::healthkit::PredicateWithStartAndEnd, margelo::nitro::healthkit::PredicateFromWorkout>>>::toJSI(runtime, arg.OR));
75
- return obj;
76
- }
77
- static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
78
- if (!value.isObject()) {
79
- return false;
80
- }
81
- jsi::Object obj = value.getObject(runtime);
82
- if (!nitro::isPlainObject(runtime, obj)) {
83
- return false;
84
- }
85
- if (!JSIConverter<std::vector<std::variant<margelo::nitro::healthkit::PredicateWithUUID, margelo::nitro::healthkit::PredicateWithUUIDs, margelo::nitro::healthkit::PredicateWithMetadataKey, margelo::nitro::healthkit::PredicateWithStartAndEnd, margelo::nitro::healthkit::PredicateFromWorkout>>>::canConvert(runtime, obj.getProperty(runtime, "OR"))) return false;
86
- return true;
87
- }
88
- };
89
-
90
- } // namespace margelo::nitro
@@ -1,96 +0,0 @@
1
- ///
2
- /// PredicateForWorkoutsAnd.hpp
3
- /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
- /// https://github.com/mrousavy/nitro
5
- /// Copyright © 2025 Marc Rousavy @ Margelo
6
- ///
7
-
8
- #pragma once
9
-
10
- #if __has_include(<NitroModules/JSIConverter.hpp>)
11
- #include <NitroModules/JSIConverter.hpp>
12
- #else
13
- #error NitroModules cannot be found! Are you sure you installed NitroModules properly?
14
- #endif
15
- #if __has_include(<NitroModules/NitroDefines.hpp>)
16
- #include <NitroModules/NitroDefines.hpp>
17
- #else
18
- #error NitroModules cannot be found! Are you sure you installed NitroModules properly?
19
- #endif
20
- #if __has_include(<NitroModules/JSIHelpers.hpp>)
21
- #include <NitroModules/JSIHelpers.hpp>
22
- #else
23
- #error NitroModules cannot be found! Are you sure you installed NitroModules properly?
24
- #endif
25
-
26
- // Forward declaration of `PredicateWithUUID` to properly resolve imports.
27
- namespace margelo::nitro::healthkit { struct PredicateWithUUID; }
28
- // Forward declaration of `PredicateWithUUIDs` to properly resolve imports.
29
- namespace margelo::nitro::healthkit { struct PredicateWithUUIDs; }
30
- // Forward declaration of `PredicateWithMetadataKey` to properly resolve imports.
31
- namespace margelo::nitro::healthkit { struct PredicateWithMetadataKey; }
32
- // Forward declaration of `PredicateWithStartAndEnd` to properly resolve imports.
33
- namespace margelo::nitro::healthkit { struct PredicateWithStartAndEnd; }
34
- // Forward declaration of `PredicateFromWorkout` to properly resolve imports.
35
- namespace margelo::nitro::healthkit { struct PredicateFromWorkout; }
36
- // Forward declaration of `WorkoutActivityTypePredicate` to properly resolve imports.
37
- namespace margelo::nitro::healthkit { struct WorkoutActivityTypePredicate; }
38
- // Forward declaration of `WorkoutDurationPredicate` to properly resolve imports.
39
- namespace margelo::nitro::healthkit { struct WorkoutDurationPredicate; }
40
-
41
- #include "PredicateWithUUID.hpp"
42
- #include "PredicateWithUUIDs.hpp"
43
- #include "PredicateWithMetadataKey.hpp"
44
- #include "PredicateWithStartAndEnd.hpp"
45
- #include "PredicateFromWorkout.hpp"
46
- #include "WorkoutActivityTypePredicate.hpp"
47
- #include "WorkoutDurationPredicate.hpp"
48
- #include <variant>
49
- #include <vector>
50
-
51
- namespace margelo::nitro::healthkit {
52
-
53
- /**
54
- * A struct which can be represented as a JavaScript object (PredicateForWorkoutsAnd).
55
- */
56
- struct PredicateForWorkoutsAnd {
57
- public:
58
- std::vector<std::variant<PredicateWithUUID, PredicateWithUUIDs, PredicateWithMetadataKey, PredicateWithStartAndEnd, PredicateFromWorkout, WorkoutActivityTypePredicate, WorkoutDurationPredicate>> AND SWIFT_PRIVATE;
59
-
60
- public:
61
- PredicateForWorkoutsAnd() = default;
62
- explicit PredicateForWorkoutsAnd(std::vector<std::variant<PredicateWithUUID, PredicateWithUUIDs, PredicateWithMetadataKey, PredicateWithStartAndEnd, PredicateFromWorkout, WorkoutActivityTypePredicate, WorkoutDurationPredicate>> AND): AND(AND) {}
63
- };
64
-
65
- } // namespace margelo::nitro::healthkit
66
-
67
- namespace margelo::nitro {
68
-
69
- // C++ PredicateForWorkoutsAnd <> JS PredicateForWorkoutsAnd (object)
70
- template <>
71
- struct JSIConverter<margelo::nitro::healthkit::PredicateForWorkoutsAnd> final {
72
- static inline margelo::nitro::healthkit::PredicateForWorkoutsAnd fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
73
- jsi::Object obj = arg.asObject(runtime);
74
- return margelo::nitro::healthkit::PredicateForWorkoutsAnd(
75
- JSIConverter<std::vector<std::variant<margelo::nitro::healthkit::PredicateWithUUID, margelo::nitro::healthkit::PredicateWithUUIDs, margelo::nitro::healthkit::PredicateWithMetadataKey, margelo::nitro::healthkit::PredicateWithStartAndEnd, margelo::nitro::healthkit::PredicateFromWorkout, margelo::nitro::healthkit::WorkoutActivityTypePredicate, margelo::nitro::healthkit::WorkoutDurationPredicate>>>::fromJSI(runtime, obj.getProperty(runtime, "AND"))
76
- );
77
- }
78
- static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::healthkit::PredicateForWorkoutsAnd& arg) {
79
- jsi::Object obj(runtime);
80
- obj.setProperty(runtime, "AND", JSIConverter<std::vector<std::variant<margelo::nitro::healthkit::PredicateWithUUID, margelo::nitro::healthkit::PredicateWithUUIDs, margelo::nitro::healthkit::PredicateWithMetadataKey, margelo::nitro::healthkit::PredicateWithStartAndEnd, margelo::nitro::healthkit::PredicateFromWorkout, margelo::nitro::healthkit::WorkoutActivityTypePredicate, margelo::nitro::healthkit::WorkoutDurationPredicate>>>::toJSI(runtime, arg.AND));
81
- return obj;
82
- }
83
- static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
84
- if (!value.isObject()) {
85
- return false;
86
- }
87
- jsi::Object obj = value.getObject(runtime);
88
- if (!nitro::isPlainObject(runtime, obj)) {
89
- return false;
90
- }
91
- if (!JSIConverter<std::vector<std::variant<margelo::nitro::healthkit::PredicateWithUUID, margelo::nitro::healthkit::PredicateWithUUIDs, margelo::nitro::healthkit::PredicateWithMetadataKey, margelo::nitro::healthkit::PredicateWithStartAndEnd, margelo::nitro::healthkit::PredicateFromWorkout, margelo::nitro::healthkit::WorkoutActivityTypePredicate, margelo::nitro::healthkit::WorkoutDurationPredicate>>>::canConvert(runtime, obj.getProperty(runtime, "AND"))) return false;
92
- return true;
93
- }
94
- };
95
-
96
- } // namespace margelo::nitro
@@ -1,96 +0,0 @@
1
- ///
2
- /// PredicateForWorkoutsOr.hpp
3
- /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
- /// https://github.com/mrousavy/nitro
5
- /// Copyright © 2025 Marc Rousavy @ Margelo
6
- ///
7
-
8
- #pragma once
9
-
10
- #if __has_include(<NitroModules/JSIConverter.hpp>)
11
- #include <NitroModules/JSIConverter.hpp>
12
- #else
13
- #error NitroModules cannot be found! Are you sure you installed NitroModules properly?
14
- #endif
15
- #if __has_include(<NitroModules/NitroDefines.hpp>)
16
- #include <NitroModules/NitroDefines.hpp>
17
- #else
18
- #error NitroModules cannot be found! Are you sure you installed NitroModules properly?
19
- #endif
20
- #if __has_include(<NitroModules/JSIHelpers.hpp>)
21
- #include <NitroModules/JSIHelpers.hpp>
22
- #else
23
- #error NitroModules cannot be found! Are you sure you installed NitroModules properly?
24
- #endif
25
-
26
- // Forward declaration of `PredicateWithUUID` to properly resolve imports.
27
- namespace margelo::nitro::healthkit { struct PredicateWithUUID; }
28
- // Forward declaration of `PredicateWithUUIDs` to properly resolve imports.
29
- namespace margelo::nitro::healthkit { struct PredicateWithUUIDs; }
30
- // Forward declaration of `PredicateWithMetadataKey` to properly resolve imports.
31
- namespace margelo::nitro::healthkit { struct PredicateWithMetadataKey; }
32
- // Forward declaration of `PredicateWithStartAndEnd` to properly resolve imports.
33
- namespace margelo::nitro::healthkit { struct PredicateWithStartAndEnd; }
34
- // Forward declaration of `PredicateFromWorkout` to properly resolve imports.
35
- namespace margelo::nitro::healthkit { struct PredicateFromWorkout; }
36
- // Forward declaration of `WorkoutActivityTypePredicate` to properly resolve imports.
37
- namespace margelo::nitro::healthkit { struct WorkoutActivityTypePredicate; }
38
- // Forward declaration of `WorkoutDurationPredicate` to properly resolve imports.
39
- namespace margelo::nitro::healthkit { struct WorkoutDurationPredicate; }
40
-
41
- #include "PredicateWithUUID.hpp"
42
- #include "PredicateWithUUIDs.hpp"
43
- #include "PredicateWithMetadataKey.hpp"
44
- #include "PredicateWithStartAndEnd.hpp"
45
- #include "PredicateFromWorkout.hpp"
46
- #include "WorkoutActivityTypePredicate.hpp"
47
- #include "WorkoutDurationPredicate.hpp"
48
- #include <variant>
49
- #include <vector>
50
-
51
- namespace margelo::nitro::healthkit {
52
-
53
- /**
54
- * A struct which can be represented as a JavaScript object (PredicateForWorkoutsOr).
55
- */
56
- struct PredicateForWorkoutsOr {
57
- public:
58
- std::vector<std::variant<PredicateWithUUID, PredicateWithUUIDs, PredicateWithMetadataKey, PredicateWithStartAndEnd, PredicateFromWorkout, WorkoutActivityTypePredicate, WorkoutDurationPredicate>> OR SWIFT_PRIVATE;
59
-
60
- public:
61
- PredicateForWorkoutsOr() = default;
62
- explicit PredicateForWorkoutsOr(std::vector<std::variant<PredicateWithUUID, PredicateWithUUIDs, PredicateWithMetadataKey, PredicateWithStartAndEnd, PredicateFromWorkout, WorkoutActivityTypePredicate, WorkoutDurationPredicate>> OR): OR(OR) {}
63
- };
64
-
65
- } // namespace margelo::nitro::healthkit
66
-
67
- namespace margelo::nitro {
68
-
69
- // C++ PredicateForWorkoutsOr <> JS PredicateForWorkoutsOr (object)
70
- template <>
71
- struct JSIConverter<margelo::nitro::healthkit::PredicateForWorkoutsOr> final {
72
- static inline margelo::nitro::healthkit::PredicateForWorkoutsOr fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
73
- jsi::Object obj = arg.asObject(runtime);
74
- return margelo::nitro::healthkit::PredicateForWorkoutsOr(
75
- JSIConverter<std::vector<std::variant<margelo::nitro::healthkit::PredicateWithUUID, margelo::nitro::healthkit::PredicateWithUUIDs, margelo::nitro::healthkit::PredicateWithMetadataKey, margelo::nitro::healthkit::PredicateWithStartAndEnd, margelo::nitro::healthkit::PredicateFromWorkout, margelo::nitro::healthkit::WorkoutActivityTypePredicate, margelo::nitro::healthkit::WorkoutDurationPredicate>>>::fromJSI(runtime, obj.getProperty(runtime, "OR"))
76
- );
77
- }
78
- static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::healthkit::PredicateForWorkoutsOr& arg) {
79
- jsi::Object obj(runtime);
80
- obj.setProperty(runtime, "OR", JSIConverter<std::vector<std::variant<margelo::nitro::healthkit::PredicateWithUUID, margelo::nitro::healthkit::PredicateWithUUIDs, margelo::nitro::healthkit::PredicateWithMetadataKey, margelo::nitro::healthkit::PredicateWithStartAndEnd, margelo::nitro::healthkit::PredicateFromWorkout, margelo::nitro::healthkit::WorkoutActivityTypePredicate, margelo::nitro::healthkit::WorkoutDurationPredicate>>>::toJSI(runtime, arg.OR));
81
- return obj;
82
- }
83
- static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
84
- if (!value.isObject()) {
85
- return false;
86
- }
87
- jsi::Object obj = value.getObject(runtime);
88
- if (!nitro::isPlainObject(runtime, obj)) {
89
- return false;
90
- }
91
- if (!JSIConverter<std::vector<std::variant<margelo::nitro::healthkit::PredicateWithUUID, margelo::nitro::healthkit::PredicateWithUUIDs, margelo::nitro::healthkit::PredicateWithMetadataKey, margelo::nitro::healthkit::PredicateWithStartAndEnd, margelo::nitro::healthkit::PredicateFromWorkout, margelo::nitro::healthkit::WorkoutActivityTypePredicate, margelo::nitro::healthkit::WorkoutDurationPredicate>>>::canConvert(runtime, obj.getProperty(runtime, "OR"))) return false;
92
- return true;
93
- }
94
- };
95
-
96
- } // namespace margelo::nitro
@@ -1,77 +0,0 @@
1
- ///
2
- /// PredicateFromWorkout.hpp
3
- /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
- /// https://github.com/mrousavy/nitro
5
- /// Copyright © 2025 Marc Rousavy @ Margelo
6
- ///
7
-
8
- #pragma once
9
-
10
- #if __has_include(<NitroModules/JSIConverter.hpp>)
11
- #include <NitroModules/JSIConverter.hpp>
12
- #else
13
- #error NitroModules cannot be found! Are you sure you installed NitroModules properly?
14
- #endif
15
- #if __has_include(<NitroModules/NitroDefines.hpp>)
16
- #include <NitroModules/NitroDefines.hpp>
17
- #else
18
- #error NitroModules cannot be found! Are you sure you installed NitroModules properly?
19
- #endif
20
- #if __has_include(<NitroModules/JSIHelpers.hpp>)
21
- #include <NitroModules/JSIHelpers.hpp>
22
- #else
23
- #error NitroModules cannot be found! Are you sure you installed NitroModules properly?
24
- #endif
25
-
26
- // Forward declaration of `HybridWorkoutProxySpec` to properly resolve imports.
27
- namespace margelo::nitro::healthkit { class HybridWorkoutProxySpec; }
28
-
29
- #include <memory>
30
- #include "HybridWorkoutProxySpec.hpp"
31
-
32
- namespace margelo::nitro::healthkit {
33
-
34
- /**
35
- * A struct which can be represented as a JavaScript object (PredicateFromWorkout).
36
- */
37
- struct PredicateFromWorkout {
38
- public:
39
- std::shared_ptr<HybridWorkoutProxySpec> workout SWIFT_PRIVATE;
40
-
41
- public:
42
- PredicateFromWorkout() = default;
43
- explicit PredicateFromWorkout(std::shared_ptr<HybridWorkoutProxySpec> workout): workout(workout) {}
44
- };
45
-
46
- } // namespace margelo::nitro::healthkit
47
-
48
- namespace margelo::nitro {
49
-
50
- // C++ PredicateFromWorkout <> JS PredicateFromWorkout (object)
51
- template <>
52
- struct JSIConverter<margelo::nitro::healthkit::PredicateFromWorkout> final {
53
- static inline margelo::nitro::healthkit::PredicateFromWorkout fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
54
- jsi::Object obj = arg.asObject(runtime);
55
- return margelo::nitro::healthkit::PredicateFromWorkout(
56
- JSIConverter<std::shared_ptr<margelo::nitro::healthkit::HybridWorkoutProxySpec>>::fromJSI(runtime, obj.getProperty(runtime, "workout"))
57
- );
58
- }
59
- static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::healthkit::PredicateFromWorkout& arg) {
60
- jsi::Object obj(runtime);
61
- obj.setProperty(runtime, "workout", JSIConverter<std::shared_ptr<margelo::nitro::healthkit::HybridWorkoutProxySpec>>::toJSI(runtime, arg.workout));
62
- return obj;
63
- }
64
- static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
65
- if (!value.isObject()) {
66
- return false;
67
- }
68
- jsi::Object obj = value.getObject(runtime);
69
- if (!nitro::isPlainObject(runtime, obj)) {
70
- return false;
71
- }
72
- if (!JSIConverter<std::shared_ptr<margelo::nitro::healthkit::HybridWorkoutProxySpec>>::canConvert(runtime, obj.getProperty(runtime, "workout"))) return false;
73
- return true;
74
- }
75
- };
76
-
77
- } // namespace margelo::nitro
@@ -1,84 +0,0 @@
1
- ///
2
- /// PredicateWithMetadataOperator.hpp
3
- /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
- /// https://github.com/mrousavy/nitro
5
- /// Copyright © 2025 Marc Rousavy @ Margelo
6
- ///
7
-
8
- #pragma once
9
-
10
- #if __has_include(<NitroModules/NitroHash.hpp>)
11
- #include <NitroModules/NitroHash.hpp>
12
- #else
13
- #error NitroModules cannot be found! Are you sure you installed NitroModules properly?
14
- #endif
15
- #if __has_include(<NitroModules/JSIConverter.hpp>)
16
- #include <NitroModules/JSIConverter.hpp>
17
- #else
18
- #error NitroModules cannot be found! Are you sure you installed NitroModules properly?
19
- #endif
20
- #if __has_include(<NitroModules/NitroDefines.hpp>)
21
- #include <NitroModules/NitroDefines.hpp>
22
- #else
23
- #error NitroModules cannot be found! Are you sure you installed NitroModules properly?
24
- #endif
25
-
26
- namespace margelo::nitro::healthkit {
27
-
28
- /**
29
- * An enum which can be represented as a JavaScript union (PredicateWithMetadataOperator).
30
- */
31
- enum class PredicateWithMetadataOperator {
32
- EQUALTO SWIFT_NAME(equalto) = 0,
33
- NOTEQUALTO SWIFT_NAME(notequalto) = 1,
34
- GREATERTHAN SWIFT_NAME(greaterthan) = 2,
35
- LESSTHAN SWIFT_NAME(lessthan) = 3,
36
- } CLOSED_ENUM;
37
-
38
- } // namespace margelo::nitro::healthkit
39
-
40
- namespace margelo::nitro {
41
-
42
- // C++ PredicateWithMetadataOperator <> JS PredicateWithMetadataOperator (union)
43
- template <>
44
- struct JSIConverter<margelo::nitro::healthkit::PredicateWithMetadataOperator> final {
45
- static inline margelo::nitro::healthkit::PredicateWithMetadataOperator fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
46
- std::string unionValue = JSIConverter<std::string>::fromJSI(runtime, arg);
47
- switch (hashString(unionValue.c_str(), unionValue.size())) {
48
- case hashString("equalTo"): return margelo::nitro::healthkit::PredicateWithMetadataOperator::EQUALTO;
49
- case hashString("notEqualTo"): return margelo::nitro::healthkit::PredicateWithMetadataOperator::NOTEQUALTO;
50
- case hashString("greaterThan"): return margelo::nitro::healthkit::PredicateWithMetadataOperator::GREATERTHAN;
51
- case hashString("lessThan"): return margelo::nitro::healthkit::PredicateWithMetadataOperator::LESSTHAN;
52
- default: [[unlikely]]
53
- throw std::invalid_argument("Cannot convert \"" + unionValue + "\" to enum PredicateWithMetadataOperator - invalid value!");
54
- }
55
- }
56
- static inline jsi::Value toJSI(jsi::Runtime& runtime, margelo::nitro::healthkit::PredicateWithMetadataOperator arg) {
57
- switch (arg) {
58
- case margelo::nitro::healthkit::PredicateWithMetadataOperator::EQUALTO: return JSIConverter<std::string>::toJSI(runtime, "equalTo");
59
- case margelo::nitro::healthkit::PredicateWithMetadataOperator::NOTEQUALTO: return JSIConverter<std::string>::toJSI(runtime, "notEqualTo");
60
- case margelo::nitro::healthkit::PredicateWithMetadataOperator::GREATERTHAN: return JSIConverter<std::string>::toJSI(runtime, "greaterThan");
61
- case margelo::nitro::healthkit::PredicateWithMetadataOperator::LESSTHAN: return JSIConverter<std::string>::toJSI(runtime, "lessThan");
62
- default: [[unlikely]]
63
- throw std::invalid_argument("Cannot convert PredicateWithMetadataOperator to JS - invalid value: "
64
- + std::to_string(static_cast<int>(arg)) + "!");
65
- }
66
- }
67
- static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
68
- if (!value.isString()) {
69
- return false;
70
- }
71
- std::string unionValue = JSIConverter<std::string>::fromJSI(runtime, value);
72
- switch (hashString(unionValue.c_str(), unionValue.size())) {
73
- case hashString("equalTo"):
74
- case hashString("notEqualTo"):
75
- case hashString("greaterThan"):
76
- case hashString("lessThan"):
77
- return true;
78
- default:
79
- return false;
80
- }
81
- }
82
- };
83
-
84
- } // namespace margelo::nitro
@@ -1,75 +0,0 @@
1
- ///
2
- /// PredicateWithUUID.hpp
3
- /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
- /// https://github.com/mrousavy/nitro
5
- /// Copyright © 2025 Marc Rousavy @ Margelo
6
- ///
7
-
8
- #pragma once
9
-
10
- #if __has_include(<NitroModules/JSIConverter.hpp>)
11
- #include <NitroModules/JSIConverter.hpp>
12
- #else
13
- #error NitroModules cannot be found! Are you sure you installed NitroModules properly?
14
- #endif
15
- #if __has_include(<NitroModules/NitroDefines.hpp>)
16
- #include <NitroModules/NitroDefines.hpp>
17
- #else
18
- #error NitroModules cannot be found! Are you sure you installed NitroModules properly?
19
- #endif
20
- #if __has_include(<NitroModules/JSIHelpers.hpp>)
21
- #include <NitroModules/JSIHelpers.hpp>
22
- #else
23
- #error NitroModules cannot be found! Are you sure you installed NitroModules properly?
24
- #endif
25
-
26
-
27
-
28
- #include <string>
29
-
30
- namespace margelo::nitro::healthkit {
31
-
32
- /**
33
- * A struct which can be represented as a JavaScript object (PredicateWithUUID).
34
- */
35
- struct PredicateWithUUID {
36
- public:
37
- std::string uuid SWIFT_PRIVATE;
38
-
39
- public:
40
- PredicateWithUUID() = default;
41
- explicit PredicateWithUUID(std::string uuid): uuid(uuid) {}
42
- };
43
-
44
- } // namespace margelo::nitro::healthkit
45
-
46
- namespace margelo::nitro {
47
-
48
- // C++ PredicateWithUUID <> JS PredicateWithUUID (object)
49
- template <>
50
- struct JSIConverter<margelo::nitro::healthkit::PredicateWithUUID> final {
51
- static inline margelo::nitro::healthkit::PredicateWithUUID fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
52
- jsi::Object obj = arg.asObject(runtime);
53
- return margelo::nitro::healthkit::PredicateWithUUID(
54
- JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "uuid"))
55
- );
56
- }
57
- static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::healthkit::PredicateWithUUID& arg) {
58
- jsi::Object obj(runtime);
59
- obj.setProperty(runtime, "uuid", JSIConverter<std::string>::toJSI(runtime, arg.uuid));
60
- return obj;
61
- }
62
- static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
63
- if (!value.isObject()) {
64
- return false;
65
- }
66
- jsi::Object obj = value.getObject(runtime);
67
- if (!nitro::isPlainObject(runtime, obj)) {
68
- return false;
69
- }
70
- if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "uuid"))) return false;
71
- return true;
72
- }
73
- };
74
-
75
- } // namespace margelo::nitro
@@ -1,76 +0,0 @@
1
- ///
2
- /// PredicateWithUUIDs.hpp
3
- /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
- /// https://github.com/mrousavy/nitro
5
- /// Copyright © 2025 Marc Rousavy @ Margelo
6
- ///
7
-
8
- #pragma once
9
-
10
- #if __has_include(<NitroModules/JSIConverter.hpp>)
11
- #include <NitroModules/JSIConverter.hpp>
12
- #else
13
- #error NitroModules cannot be found! Are you sure you installed NitroModules properly?
14
- #endif
15
- #if __has_include(<NitroModules/NitroDefines.hpp>)
16
- #include <NitroModules/NitroDefines.hpp>
17
- #else
18
- #error NitroModules cannot be found! Are you sure you installed NitroModules properly?
19
- #endif
20
- #if __has_include(<NitroModules/JSIHelpers.hpp>)
21
- #include <NitroModules/JSIHelpers.hpp>
22
- #else
23
- #error NitroModules cannot be found! Are you sure you installed NitroModules properly?
24
- #endif
25
-
26
-
27
-
28
- #include <string>
29
- #include <vector>
30
-
31
- namespace margelo::nitro::healthkit {
32
-
33
- /**
34
- * A struct which can be represented as a JavaScript object (PredicateWithUUIDs).
35
- */
36
- struct PredicateWithUUIDs {
37
- public:
38
- std::vector<std::string> uuids SWIFT_PRIVATE;
39
-
40
- public:
41
- PredicateWithUUIDs() = default;
42
- explicit PredicateWithUUIDs(std::vector<std::string> uuids): uuids(uuids) {}
43
- };
44
-
45
- } // namespace margelo::nitro::healthkit
46
-
47
- namespace margelo::nitro {
48
-
49
- // C++ PredicateWithUUIDs <> JS PredicateWithUUIDs (object)
50
- template <>
51
- struct JSIConverter<margelo::nitro::healthkit::PredicateWithUUIDs> final {
52
- static inline margelo::nitro::healthkit::PredicateWithUUIDs fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
53
- jsi::Object obj = arg.asObject(runtime);
54
- return margelo::nitro::healthkit::PredicateWithUUIDs(
55
- JSIConverter<std::vector<std::string>>::fromJSI(runtime, obj.getProperty(runtime, "uuids"))
56
- );
57
- }
58
- static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::healthkit::PredicateWithUUIDs& arg) {
59
- jsi::Object obj(runtime);
60
- obj.setProperty(runtime, "uuids", JSIConverter<std::vector<std::string>>::toJSI(runtime, arg.uuids));
61
- return obj;
62
- }
63
- static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
64
- if (!value.isObject()) {
65
- return false;
66
- }
67
- jsi::Object obj = value.getObject(runtime);
68
- if (!nitro::isPlainObject(runtime, obj)) {
69
- return false;
70
- }
71
- if (!JSIConverter<std::vector<std::string>>::canConvert(runtime, obj.getProperty(runtime, "uuids"))) return false;
72
- return true;
73
- }
74
- };
75
-
76
- } // namespace margelo::nitro
@@ -1,76 +0,0 @@
1
- ///
2
- /// WorkoutActivityTypePredicate.hpp
3
- /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
- /// https://github.com/mrousavy/nitro
5
- /// Copyright © 2025 Marc Rousavy @ Margelo
6
- ///
7
-
8
- #pragma once
9
-
10
- #if __has_include(<NitroModules/JSIConverter.hpp>)
11
- #include <NitroModules/JSIConverter.hpp>
12
- #else
13
- #error NitroModules cannot be found! Are you sure you installed NitroModules properly?
14
- #endif
15
- #if __has_include(<NitroModules/NitroDefines.hpp>)
16
- #include <NitroModules/NitroDefines.hpp>
17
- #else
18
- #error NitroModules cannot be found! Are you sure you installed NitroModules properly?
19
- #endif
20
- #if __has_include(<NitroModules/JSIHelpers.hpp>)
21
- #include <NitroModules/JSIHelpers.hpp>
22
- #else
23
- #error NitroModules cannot be found! Are you sure you installed NitroModules properly?
24
- #endif
25
-
26
- // Forward declaration of `WorkoutActivityType` to properly resolve imports.
27
- namespace margelo::nitro::healthkit { enum class WorkoutActivityType; }
28
-
29
- #include "WorkoutActivityType.hpp"
30
-
31
- namespace margelo::nitro::healthkit {
32
-
33
- /**
34
- * A struct which can be represented as a JavaScript object (WorkoutActivityTypePredicate).
35
- */
36
- struct WorkoutActivityTypePredicate {
37
- public:
38
- WorkoutActivityType workoutActivityType SWIFT_PRIVATE;
39
-
40
- public:
41
- WorkoutActivityTypePredicate() = default;
42
- explicit WorkoutActivityTypePredicate(WorkoutActivityType workoutActivityType): workoutActivityType(workoutActivityType) {}
43
- };
44
-
45
- } // namespace margelo::nitro::healthkit
46
-
47
- namespace margelo::nitro {
48
-
49
- // C++ WorkoutActivityTypePredicate <> JS WorkoutActivityTypePredicate (object)
50
- template <>
51
- struct JSIConverter<margelo::nitro::healthkit::WorkoutActivityTypePredicate> final {
52
- static inline margelo::nitro::healthkit::WorkoutActivityTypePredicate fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
53
- jsi::Object obj = arg.asObject(runtime);
54
- return margelo::nitro::healthkit::WorkoutActivityTypePredicate(
55
- JSIConverter<margelo::nitro::healthkit::WorkoutActivityType>::fromJSI(runtime, obj.getProperty(runtime, "workoutActivityType"))
56
- );
57
- }
58
- static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::healthkit::WorkoutActivityTypePredicate& arg) {
59
- jsi::Object obj(runtime);
60
- obj.setProperty(runtime, "workoutActivityType", JSIConverter<margelo::nitro::healthkit::WorkoutActivityType>::toJSI(runtime, arg.workoutActivityType));
61
- return obj;
62
- }
63
- static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
64
- if (!value.isObject()) {
65
- return false;
66
- }
67
- jsi::Object obj = value.getObject(runtime);
68
- if (!nitro::isPlainObject(runtime, obj)) {
69
- return false;
70
- }
71
- if (!JSIConverter<margelo::nitro::healthkit::WorkoutActivityType>::canConvert(runtime, obj.getProperty(runtime, "workoutActivityType"))) return false;
72
- return true;
73
- }
74
- };
75
-
76
- } // namespace margelo::nitro