@kingstinct/react-native-healthkit 11.1.0 → 11.1.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.
- package/ios/Constants.swift +1 -0
- package/ios/CoreModule.swift +16 -5
- package/ios/ElectrocardiogramModule.swift +3 -1
- package/ios/Helpers.swift +6 -0
- package/lib/commonjs/healthkit.js +1 -2
- package/lib/commonjs/types/Constants.js +7 -2
- package/lib/module/healthkit.js +1 -2
- package/lib/module/types/Constants.js +6 -1
- package/lib/typescript/types/Constants.d.ts +6 -1
- package/lib/typescript/types/Shared.d.ts +2 -2
- package/nitrogen/generated/ios/ReactNativeHealthkit-Swift-Cxx-Bridge.cpp +54 -54
- package/nitrogen/generated/ios/ReactNativeHealthkit-Swift-Cxx-Bridge.hpp +85 -78
- package/nitrogen/generated/ios/c++/HybridCategoryTypeModuleSpecSwift.hpp +1 -1
- package/nitrogen/generated/ios/c++/HybridElectrocardiogramModuleSpecSwift.hpp +1 -1
- package/nitrogen/generated/ios/c++/HybridHeartbeatSeriesModuleSpecSwift.hpp +1 -1
- package/nitrogen/generated/ios/c++/HybridQuantityTypeModuleSpecSwift.hpp +2 -2
- package/nitrogen/generated/ios/c++/HybridWorkoutProxySpecSwift.hpp +1 -2
- package/nitrogen/generated/ios/c++/HybridWorkoutsModuleSpecSwift.hpp +4 -4
- package/nitrogen/generated/ios/swift/CategorySample.swift +2 -16
- package/nitrogen/generated/ios/swift/CategorySampleForSaving.swift +1 -8
- package/nitrogen/generated/ios/swift/ElectrocardiogramSample.swift +2 -16
- package/nitrogen/generated/ios/swift/Func_void_std__optional_QueryStatisticsResponse_.swift +1 -8
- package/nitrogen/generated/ios/swift/Func_void_std__optional_WorkoutPlan_.swift +1 -8
- package/nitrogen/generated/ios/swift/HeartbeatSeriesSample.swift +2 -16
- package/nitrogen/generated/ios/swift/HybridCategoryTypeModuleSpec_cxx.swift +1 -8
- package/nitrogen/generated/ios/swift/HybridCoreModuleSpec_cxx.swift +33 -5
- package/nitrogen/generated/ios/swift/HybridElectrocardiogramModuleSpec_cxx.swift +1 -8
- package/nitrogen/generated/ios/swift/HybridHeartbeatSeriesModuleSpec_cxx.swift +1 -8
- package/nitrogen/generated/ios/swift/HybridQuantityTypeModuleSpec_cxx.swift +11 -24
- package/nitrogen/generated/ios/swift/HybridStateOfMindModuleSpec_cxx.swift +10 -9
- package/nitrogen/generated/ios/swift/ObjectTypeIdentifier.swift +4 -0
- package/nitrogen/generated/ios/swift/QuantitySample.swift +2 -16
- package/nitrogen/generated/ios/swift/QuantitySampleForSaving.swift +1 -8
- package/nitrogen/generated/ios/swift/QueryStatisticsResponse.swift +7 -56
- package/nitrogen/generated/ios/swift/SampleTypeIdentifier.swift +4 -0
- package/nitrogen/generated/ios/swift/StateOfMindSample.swift +23 -45
- package/nitrogen/generated/ios/swift/WorkoutSample.swift +2 -16
- package/nitrogen/generated/shared/c++/CategorySample.hpp +8 -0
- package/nitrogen/generated/shared/c++/CategorySampleForSaving.hpp +8 -0
- package/nitrogen/generated/shared/c++/CategorySamplesWithAnchorResponse.hpp +8 -0
- package/nitrogen/generated/shared/c++/CorrelationSample.hpp +8 -0
- package/nitrogen/generated/shared/c++/DeletedSample.hpp +8 -0
- package/nitrogen/generated/shared/c++/Device.hpp +8 -0
- package/nitrogen/generated/shared/c++/ECGQueryOptionsWithAnchor.hpp +8 -0
- package/nitrogen/generated/shared/c++/ECGQueryOptionsWithSortOrder.hpp +8 -0
- package/nitrogen/generated/shared/c++/ElectrocardiogramSample.hpp +8 -0
- package/nitrogen/generated/shared/c++/ElectrocardiogramSamplesWithAnchorResponse.hpp +8 -0
- package/nitrogen/generated/shared/c++/ElectrocardiogramVoltage.hpp +8 -0
- package/nitrogen/generated/shared/c++/FilterForSamplesAnd.hpp +8 -0
- package/nitrogen/generated/shared/c++/FilterForSamplesOr.hpp +8 -0
- package/nitrogen/generated/shared/c++/Heartbeat.hpp +8 -0
- package/nitrogen/generated/shared/c++/HeartbeatSeriesSample.hpp +8 -0
- package/nitrogen/generated/shared/c++/HeartbeatSeriesSamplesWithAnchorResponse.hpp +8 -0
- package/nitrogen/generated/shared/c++/IdentifierWithUnit.hpp +8 -0
- package/nitrogen/generated/shared/c++/IntervalComponents.hpp +8 -0
- package/nitrogen/generated/shared/c++/LocationForSaving.hpp +8 -0
- package/nitrogen/generated/shared/c++/ObjectTypeIdentifier.hpp +5 -1
- package/nitrogen/generated/shared/c++/OnChangeCallbackArgs.hpp +8 -0
- package/nitrogen/generated/shared/c++/PredicateForWorkoutsAnd.hpp +8 -0
- package/nitrogen/generated/shared/c++/PredicateForWorkoutsOr.hpp +8 -0
- package/nitrogen/generated/shared/c++/PredicateFromWorkout.hpp +8 -0
- package/nitrogen/generated/shared/c++/PredicateWithMetadataKey.hpp +8 -0
- package/nitrogen/generated/shared/c++/PredicateWithStartAndEnd.hpp +8 -0
- package/nitrogen/generated/shared/c++/PredicateWithUUID.hpp +8 -0
- package/nitrogen/generated/shared/c++/PredicateWithUUIDs.hpp +8 -0
- package/nitrogen/generated/shared/c++/Quantity.hpp +8 -0
- package/nitrogen/generated/shared/c++/QuantityDateInterval.hpp +8 -0
- package/nitrogen/generated/shared/c++/QuantitySample.hpp +8 -0
- package/nitrogen/generated/shared/c++/QuantitySampleForSaving.hpp +8 -0
- package/nitrogen/generated/shared/c++/QuantitySamplesWithAnchorResponse.hpp +8 -0
- package/nitrogen/generated/shared/c++/QueryOptionsWithAnchor.hpp +8 -0
- package/nitrogen/generated/shared/c++/QueryOptionsWithAnchorAndUnit.hpp +8 -0
- package/nitrogen/generated/shared/c++/QueryOptionsWithSortOrder.hpp +8 -0
- package/nitrogen/generated/shared/c++/QueryOptionsWithSortOrderAndUnit.hpp +8 -0
- package/nitrogen/generated/shared/c++/QueryStatisticsResponse.hpp +8 -0
- package/nitrogen/generated/shared/c++/QueryWorkoutSamplesWithAnchorResponse.hpp +8 -0
- package/nitrogen/generated/shared/c++/SampleTypeIdentifier.hpp +4 -0
- package/nitrogen/generated/shared/c++/Source.hpp +8 -0
- package/nitrogen/generated/shared/c++/SourceRevision.hpp +8 -0
- package/nitrogen/generated/shared/c++/StateOfMindSample.hpp +8 -0
- package/nitrogen/generated/shared/c++/StatisticsQueryOptions.hpp +8 -0
- package/nitrogen/generated/shared/c++/WorkoutActivity.hpp +8 -0
- package/nitrogen/generated/shared/c++/WorkoutActivityTypePredicate.hpp +8 -0
- package/nitrogen/generated/shared/c++/WorkoutConfiguration.hpp +8 -0
- package/nitrogen/generated/shared/c++/WorkoutDurationPredicate.hpp +8 -0
- package/nitrogen/generated/shared/c++/WorkoutEvent.hpp +8 -0
- package/nitrogen/generated/shared/c++/WorkoutPlan.hpp +8 -0
- package/nitrogen/generated/shared/c++/WorkoutQueryOptions.hpp +8 -0
- package/nitrogen/generated/shared/c++/WorkoutQueryOptionsWithAnchor.hpp +8 -0
- package/nitrogen/generated/shared/c++/WorkoutRoute.hpp +8 -0
- package/nitrogen/generated/shared/c++/WorkoutRouteLocation.hpp +8 -0
- package/nitrogen/generated/shared/c++/WorkoutSample.hpp +8 -0
- package/nitrogen/generated/shared/c++/WorkoutTotals.hpp +8 -0
- package/package.json +5 -5
- package/src/healthkit.ts +2 -4
- package/src/types/Constants.ts +8 -1
- package/src/types/Shared.ts +2 -0
|
@@ -37,19 +37,11 @@ public extension StateOfMindSample {
|
|
|
37
37
|
} else {
|
|
38
38
|
return .init()
|
|
39
39
|
}
|
|
40
|
-
}(), valence, kind, valenceClassification, {
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
return __vector
|
|
46
|
-
}(), { () -> bridge.std__vector_StateOfMindLabel_ in
|
|
47
|
-
var __vector = bridge.create_std__vector_StateOfMindLabel_(labels.count)
|
|
48
|
-
for __item in labels {
|
|
49
|
-
__vector.push_back(__item)
|
|
50
|
-
}
|
|
51
|
-
return __vector
|
|
52
|
-
}())
|
|
40
|
+
}(), valence, kind, valenceClassification, associations.withUnsafeBufferPointer { __pointer -> bridge.std__vector_StateOfMindAssociation_ in
|
|
41
|
+
return bridge.copy_std__vector_StateOfMindAssociation_(__pointer.baseAddress!, associations.count)
|
|
42
|
+
}, labels.withUnsafeBufferPointer { __pointer -> bridge.std__vector_StateOfMindLabel_ in
|
|
43
|
+
return bridge.copy_std__vector_StateOfMindLabel_(__pointer.baseAddress!, labels.count)
|
|
44
|
+
})
|
|
53
45
|
}
|
|
54
46
|
|
|
55
47
|
var uuid: String {
|
|
@@ -66,14 +58,7 @@ public extension StateOfMindSample {
|
|
|
66
58
|
var device: Device? {
|
|
67
59
|
@inline(__always)
|
|
68
60
|
get {
|
|
69
|
-
return
|
|
70
|
-
if bridge.has_value_std__optional_Device_(self.__device) {
|
|
71
|
-
let __unwrapped = bridge.get_std__optional_Device_(self.__device)
|
|
72
|
-
return __unwrapped
|
|
73
|
-
} else {
|
|
74
|
-
return nil
|
|
75
|
-
}
|
|
76
|
-
}()
|
|
61
|
+
return self.__device.value
|
|
77
62
|
}
|
|
78
63
|
@inline(__always)
|
|
79
64
|
set {
|
|
@@ -136,14 +121,7 @@ public extension StateOfMindSample {
|
|
|
136
121
|
var sourceRevision: SourceRevision? {
|
|
137
122
|
@inline(__always)
|
|
138
123
|
get {
|
|
139
|
-
return
|
|
140
|
-
if bridge.has_value_std__optional_SourceRevision_(self.__sourceRevision) {
|
|
141
|
-
let __unwrapped = bridge.get_std__optional_SourceRevision_(self.__sourceRevision)
|
|
142
|
-
return __unwrapped
|
|
143
|
-
} else {
|
|
144
|
-
return nil
|
|
145
|
-
}
|
|
146
|
-
}()
|
|
124
|
+
return self.__sourceRevision.value
|
|
147
125
|
}
|
|
148
126
|
@inline(__always)
|
|
149
127
|
set {
|
|
@@ -193,34 +171,34 @@ public extension StateOfMindSample {
|
|
|
193
171
|
var associations: [StateOfMindAssociation] {
|
|
194
172
|
@inline(__always)
|
|
195
173
|
get {
|
|
196
|
-
return
|
|
174
|
+
return { () -> [StateOfMindAssociation] in
|
|
175
|
+
let __data = bridge.get_data_std__vector_StateOfMindAssociation_(self.__associations)
|
|
176
|
+
let __size = self.__associations.size()
|
|
177
|
+
return Array(UnsafeBufferPointer(start: __data, count: __size))
|
|
178
|
+
}()
|
|
197
179
|
}
|
|
198
180
|
@inline(__always)
|
|
199
181
|
set {
|
|
200
|
-
self.__associations = {
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
__vector.push_back(__item)
|
|
204
|
-
}
|
|
205
|
-
return __vector
|
|
206
|
-
}()
|
|
182
|
+
self.__associations = newValue.withUnsafeBufferPointer { __pointer -> bridge.std__vector_StateOfMindAssociation_ in
|
|
183
|
+
return bridge.copy_std__vector_StateOfMindAssociation_(__pointer.baseAddress!, newValue.count)
|
|
184
|
+
}
|
|
207
185
|
}
|
|
208
186
|
}
|
|
209
187
|
|
|
210
188
|
var labels: [StateOfMindLabel] {
|
|
211
189
|
@inline(__always)
|
|
212
190
|
get {
|
|
213
|
-
return
|
|
191
|
+
return { () -> [StateOfMindLabel] in
|
|
192
|
+
let __data = bridge.get_data_std__vector_StateOfMindLabel_(self.__labels)
|
|
193
|
+
let __size = self.__labels.size()
|
|
194
|
+
return Array(UnsafeBufferPointer(start: __data, count: __size))
|
|
195
|
+
}()
|
|
214
196
|
}
|
|
215
197
|
@inline(__always)
|
|
216
198
|
set {
|
|
217
|
-
self.__labels = {
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
__vector.push_back(__item)
|
|
221
|
-
}
|
|
222
|
-
return __vector
|
|
223
|
-
}()
|
|
199
|
+
self.__labels = newValue.withUnsafeBufferPointer { __pointer -> bridge.std__vector_StateOfMindLabel_ in
|
|
200
|
+
return bridge.copy_std__vector_StateOfMindLabel_(__pointer.baseAddress!, newValue.count)
|
|
201
|
+
}
|
|
224
202
|
}
|
|
225
203
|
}
|
|
226
204
|
}
|
|
@@ -78,14 +78,7 @@ public extension WorkoutSample {
|
|
|
78
78
|
var device: Device? {
|
|
79
79
|
@inline(__always)
|
|
80
80
|
get {
|
|
81
|
-
return
|
|
82
|
-
if bridge.has_value_std__optional_Device_(self.__device) {
|
|
83
|
-
let __unwrapped = bridge.get_std__optional_Device_(self.__device)
|
|
84
|
-
return __unwrapped
|
|
85
|
-
} else {
|
|
86
|
-
return nil
|
|
87
|
-
}
|
|
88
|
-
}()
|
|
81
|
+
return self.__device.value
|
|
89
82
|
}
|
|
90
83
|
@inline(__always)
|
|
91
84
|
set {
|
|
@@ -170,14 +163,7 @@ public extension WorkoutSample {
|
|
|
170
163
|
var sourceRevision: SourceRevision? {
|
|
171
164
|
@inline(__always)
|
|
172
165
|
get {
|
|
173
|
-
return
|
|
174
|
-
if bridge.has_value_std__optional_SourceRevision_(self.__sourceRevision) {
|
|
175
|
-
let __unwrapped = bridge.get_std__optional_SourceRevision_(self.__sourceRevision)
|
|
176
|
-
return __unwrapped
|
|
177
|
-
} else {
|
|
178
|
-
return nil
|
|
179
|
-
}
|
|
180
|
-
}()
|
|
166
|
+
return self.__sourceRevision.value
|
|
181
167
|
}
|
|
182
168
|
@inline(__always)
|
|
183
169
|
set {
|
|
@@ -17,6 +17,11 @@
|
|
|
17
17
|
#else
|
|
18
18
|
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
19
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
|
|
20
25
|
|
|
21
26
|
// Forward declaration of `Device` to properly resolve imports.
|
|
22
27
|
namespace margelo::nitro::healthkit { struct Device; }
|
|
@@ -93,6 +98,9 @@ namespace margelo::nitro {
|
|
|
93
98
|
return false;
|
|
94
99
|
}
|
|
95
100
|
jsi::Object obj = value.getObject(runtime);
|
|
101
|
+
if (!nitro::isPlainObject(runtime, obj)) {
|
|
102
|
+
return false;
|
|
103
|
+
}
|
|
96
104
|
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "uuid"))) return false;
|
|
97
105
|
if (!JSIConverter<std::optional<margelo::nitro::healthkit::Device>>::canConvert(runtime, obj.getProperty(runtime, "device"))) return false;
|
|
98
106
|
if (!JSIConverter<margelo::nitro::healthkit::CategoryTypeIdentifier>::canConvert(runtime, obj.getProperty(runtime, "categoryType"))) return false;
|
|
@@ -17,6 +17,11 @@
|
|
|
17
17
|
#else
|
|
18
18
|
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
19
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
|
|
20
25
|
|
|
21
26
|
// Forward declaration of `CategoryTypeIdentifier` to properly resolve imports.
|
|
22
27
|
namespace margelo::nitro::healthkit { enum class CategoryTypeIdentifier; }
|
|
@@ -83,6 +88,9 @@ namespace margelo::nitro {
|
|
|
83
88
|
return false;
|
|
84
89
|
}
|
|
85
90
|
jsi::Object obj = value.getObject(runtime);
|
|
91
|
+
if (!nitro::isPlainObject(runtime, obj)) {
|
|
92
|
+
return false;
|
|
93
|
+
}
|
|
86
94
|
if (!JSIConverter<std::chrono::system_clock::time_point>::canConvert(runtime, obj.getProperty(runtime, "start"))) return false;
|
|
87
95
|
if (!JSIConverter<std::chrono::system_clock::time_point>::canConvert(runtime, obj.getProperty(runtime, "end"))) return false;
|
|
88
96
|
if (!JSIConverter<margelo::nitro::healthkit::CategoryTypeIdentifier>::canConvert(runtime, obj.getProperty(runtime, "categoryType"))) return false;
|
|
@@ -17,6 +17,11 @@
|
|
|
17
17
|
#else
|
|
18
18
|
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
19
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
|
|
20
25
|
|
|
21
26
|
// Forward declaration of `CategorySample` to properly resolve imports.
|
|
22
27
|
namespace margelo::nitro::healthkit { struct CategorySample; }
|
|
@@ -71,6 +76,9 @@ namespace margelo::nitro {
|
|
|
71
76
|
return false;
|
|
72
77
|
}
|
|
73
78
|
jsi::Object obj = value.getObject(runtime);
|
|
79
|
+
if (!nitro::isPlainObject(runtime, obj)) {
|
|
80
|
+
return false;
|
|
81
|
+
}
|
|
74
82
|
if (!JSIConverter<std::vector<margelo::nitro::healthkit::CategorySample>>::canConvert(runtime, obj.getProperty(runtime, "samples"))) return false;
|
|
75
83
|
if (!JSIConverter<std::vector<margelo::nitro::healthkit::DeletedSample>>::canConvert(runtime, obj.getProperty(runtime, "deletedSamples"))) return false;
|
|
76
84
|
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "newAnchor"))) return false;
|
|
@@ -17,6 +17,11 @@
|
|
|
17
17
|
#else
|
|
18
18
|
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
19
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
|
|
20
25
|
|
|
21
26
|
// Forward declaration of `CorrelationTypeIdentifier` to properly resolve imports.
|
|
22
27
|
namespace margelo::nitro::healthkit { enum class CorrelationTypeIdentifier; }
|
|
@@ -88,6 +93,9 @@ namespace margelo::nitro {
|
|
|
88
93
|
return false;
|
|
89
94
|
}
|
|
90
95
|
jsi::Object obj = value.getObject(runtime);
|
|
96
|
+
if (!nitro::isPlainObject(runtime, obj)) {
|
|
97
|
+
return false;
|
|
98
|
+
}
|
|
91
99
|
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "uuid"))) return false;
|
|
92
100
|
if (!JSIConverter<margelo::nitro::healthkit::CorrelationTypeIdentifier>::canConvert(runtime, obj.getProperty(runtime, "correlationType"))) return false;
|
|
93
101
|
if (!JSIConverter<std::vector<std::variant<margelo::nitro::healthkit::CategorySample, margelo::nitro::healthkit::QuantitySample>>>::canConvert(runtime, obj.getProperty(runtime, "objects"))) return false;
|
|
@@ -17,6 +17,11 @@
|
|
|
17
17
|
#else
|
|
18
18
|
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
19
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
|
|
20
25
|
|
|
21
26
|
// Forward declaration of `AnyMap` to properly resolve imports.
|
|
22
27
|
namespace NitroModules { class AnyMap; }
|
|
@@ -65,6 +70,9 @@ namespace margelo::nitro {
|
|
|
65
70
|
return false;
|
|
66
71
|
}
|
|
67
72
|
jsi::Object obj = value.getObject(runtime);
|
|
73
|
+
if (!nitro::isPlainObject(runtime, obj)) {
|
|
74
|
+
return false;
|
|
75
|
+
}
|
|
68
76
|
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "uuid"))) return false;
|
|
69
77
|
if (!JSIConverter<std::optional<std::shared_ptr<AnyMap>>>::canConvert(runtime, obj.getProperty(runtime, "metadata"))) return false;
|
|
70
78
|
return true;
|
|
@@ -17,6 +17,11 @@
|
|
|
17
17
|
#else
|
|
18
18
|
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
19
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
|
|
20
25
|
|
|
21
26
|
|
|
22
27
|
|
|
@@ -81,6 +86,9 @@ namespace margelo::nitro {
|
|
|
81
86
|
return false;
|
|
82
87
|
}
|
|
83
88
|
jsi::Object obj = value.getObject(runtime);
|
|
89
|
+
if (!nitro::isPlainObject(runtime, obj)) {
|
|
90
|
+
return false;
|
|
91
|
+
}
|
|
84
92
|
if (!JSIConverter<std::optional<std::string>>::canConvert(runtime, obj.getProperty(runtime, "name"))) return false;
|
|
85
93
|
if (!JSIConverter<std::optional<std::string>>::canConvert(runtime, obj.getProperty(runtime, "firmwareVersion"))) return false;
|
|
86
94
|
if (!JSIConverter<std::optional<std::string>>::canConvert(runtime, obj.getProperty(runtime, "hardwareVersion"))) return false;
|
|
@@ -17,6 +17,11 @@
|
|
|
17
17
|
#else
|
|
18
18
|
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
19
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
|
|
20
25
|
|
|
21
26
|
// Forward declaration of `PredicateWithUUID` to properly resolve imports.
|
|
22
27
|
namespace margelo::nitro::healthkit { struct PredicateWithUUID; }
|
|
@@ -90,6 +95,9 @@ namespace margelo::nitro {
|
|
|
90
95
|
return false;
|
|
91
96
|
}
|
|
92
97
|
jsi::Object obj = value.getObject(runtime);
|
|
98
|
+
if (!nitro::isPlainObject(runtime, obj)) {
|
|
99
|
+
return false;
|
|
100
|
+
}
|
|
93
101
|
if (!JSIConverter<bool>::canConvert(runtime, obj.getProperty(runtime, "includeVoltages"))) return false;
|
|
94
102
|
if (!JSIConverter<std::optional<std::string>>::canConvert(runtime, obj.getProperty(runtime, "anchor"))) return false;
|
|
95
103
|
if (!JSIConverter<std::optional<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::FilterForSamplesAnd, margelo::nitro::healthkit::FilterForSamplesOr>>>::canConvert(runtime, obj.getProperty(runtime, "filter"))) return false;
|
|
@@ -17,6 +17,11 @@
|
|
|
17
17
|
#else
|
|
18
18
|
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
19
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
|
|
20
25
|
|
|
21
26
|
// Forward declaration of `PredicateWithUUID` to properly resolve imports.
|
|
22
27
|
namespace margelo::nitro::healthkit { struct PredicateWithUUID; }
|
|
@@ -89,6 +94,9 @@ namespace margelo::nitro {
|
|
|
89
94
|
return false;
|
|
90
95
|
}
|
|
91
96
|
jsi::Object obj = value.getObject(runtime);
|
|
97
|
+
if (!nitro::isPlainObject(runtime, obj)) {
|
|
98
|
+
return false;
|
|
99
|
+
}
|
|
92
100
|
if (!JSIConverter<std::optional<bool>>::canConvert(runtime, obj.getProperty(runtime, "includeVoltages"))) return false;
|
|
93
101
|
if (!JSIConverter<std::optional<bool>>::canConvert(runtime, obj.getProperty(runtime, "ascending"))) return false;
|
|
94
102
|
if (!JSIConverter<std::optional<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::FilterForSamplesAnd, margelo::nitro::healthkit::FilterForSamplesOr>>>::canConvert(runtime, obj.getProperty(runtime, "filter"))) return false;
|
|
@@ -17,6 +17,11 @@
|
|
|
17
17
|
#else
|
|
18
18
|
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
19
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
|
|
20
25
|
|
|
21
26
|
// Forward declaration of `Device` to properly resolve imports.
|
|
22
27
|
namespace margelo::nitro::healthkit { struct Device; }
|
|
@@ -115,6 +120,9 @@ namespace margelo::nitro {
|
|
|
115
120
|
return false;
|
|
116
121
|
}
|
|
117
122
|
jsi::Object obj = value.getObject(runtime);
|
|
123
|
+
if (!nitro::isPlainObject(runtime, obj)) {
|
|
124
|
+
return false;
|
|
125
|
+
}
|
|
118
126
|
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "uuid"))) return false;
|
|
119
127
|
if (!JSIConverter<std::optional<margelo::nitro::healthkit::Device>>::canConvert(runtime, obj.getProperty(runtime, "device"))) return false;
|
|
120
128
|
if (!JSIConverter<std::chrono::system_clock::time_point>::canConvert(runtime, obj.getProperty(runtime, "startDate"))) return false;
|
|
@@ -17,6 +17,11 @@
|
|
|
17
17
|
#else
|
|
18
18
|
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
19
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
|
|
20
25
|
|
|
21
26
|
// Forward declaration of `ElectrocardiogramSample` to properly resolve imports.
|
|
22
27
|
namespace margelo::nitro::healthkit { struct ElectrocardiogramSample; }
|
|
@@ -71,6 +76,9 @@ namespace margelo::nitro {
|
|
|
71
76
|
return false;
|
|
72
77
|
}
|
|
73
78
|
jsi::Object obj = value.getObject(runtime);
|
|
79
|
+
if (!nitro::isPlainObject(runtime, obj)) {
|
|
80
|
+
return false;
|
|
81
|
+
}
|
|
74
82
|
if (!JSIConverter<std::vector<margelo::nitro::healthkit::ElectrocardiogramSample>>::canConvert(runtime, obj.getProperty(runtime, "samples"))) return false;
|
|
75
83
|
if (!JSIConverter<std::vector<margelo::nitro::healthkit::DeletedSample>>::canConvert(runtime, obj.getProperty(runtime, "deletedSamples"))) return false;
|
|
76
84
|
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "newAnchor"))) return false;
|
|
@@ -17,6 +17,11 @@
|
|
|
17
17
|
#else
|
|
18
18
|
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
19
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
|
|
20
25
|
|
|
21
26
|
// Forward declaration of `ElectrocardiogramLead` to properly resolve imports.
|
|
22
27
|
namespace margelo::nitro::healthkit { enum class ElectrocardiogramLead; }
|
|
@@ -66,6 +71,9 @@ namespace margelo::nitro {
|
|
|
66
71
|
return false;
|
|
67
72
|
}
|
|
68
73
|
jsi::Object obj = value.getObject(runtime);
|
|
74
|
+
if (!nitro::isPlainObject(runtime, obj)) {
|
|
75
|
+
return false;
|
|
76
|
+
}
|
|
69
77
|
if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, "timeSinceSampleStart"))) return false;
|
|
70
78
|
if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, "voltage"))) return false;
|
|
71
79
|
if (!JSIConverter<margelo::nitro::healthkit::ElectrocardiogramLead>::canConvert(runtime, obj.getProperty(runtime, "lead"))) return false;
|
|
@@ -17,6 +17,11 @@
|
|
|
17
17
|
#else
|
|
18
18
|
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
19
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
|
|
20
25
|
|
|
21
26
|
// Forward declaration of `PredicateWithUUID` to properly resolve imports.
|
|
22
27
|
namespace margelo::nitro::healthkit { struct PredicateWithUUID; }
|
|
@@ -74,6 +79,9 @@ namespace margelo::nitro {
|
|
|
74
79
|
return false;
|
|
75
80
|
}
|
|
76
81
|
jsi::Object obj = value.getObject(runtime);
|
|
82
|
+
if (!nitro::isPlainObject(runtime, obj)) {
|
|
83
|
+
return false;
|
|
84
|
+
}
|
|
77
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, "AND"))) return false;
|
|
78
86
|
return true;
|
|
79
87
|
}
|
|
@@ -17,6 +17,11 @@
|
|
|
17
17
|
#else
|
|
18
18
|
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
19
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
|
|
20
25
|
|
|
21
26
|
// Forward declaration of `PredicateWithUUID` to properly resolve imports.
|
|
22
27
|
namespace margelo::nitro::healthkit { struct PredicateWithUUID; }
|
|
@@ -74,6 +79,9 @@ namespace margelo::nitro {
|
|
|
74
79
|
return false;
|
|
75
80
|
}
|
|
76
81
|
jsi::Object obj = value.getObject(runtime);
|
|
82
|
+
if (!nitro::isPlainObject(runtime, obj)) {
|
|
83
|
+
return false;
|
|
84
|
+
}
|
|
77
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;
|
|
78
86
|
return true;
|
|
79
87
|
}
|
|
@@ -17,6 +17,11 @@
|
|
|
17
17
|
#else
|
|
18
18
|
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
19
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
|
|
20
25
|
|
|
21
26
|
|
|
22
27
|
|
|
@@ -62,6 +67,9 @@ namespace margelo::nitro {
|
|
|
62
67
|
return false;
|
|
63
68
|
}
|
|
64
69
|
jsi::Object obj = value.getObject(runtime);
|
|
70
|
+
if (!nitro::isPlainObject(runtime, obj)) {
|
|
71
|
+
return false;
|
|
72
|
+
}
|
|
65
73
|
if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, "timeSinceSeriesStart"))) return false;
|
|
66
74
|
if (!JSIConverter<bool>::canConvert(runtime, obj.getProperty(runtime, "precededByGap"))) return false;
|
|
67
75
|
return true;
|
|
@@ -17,6 +17,11 @@
|
|
|
17
17
|
#else
|
|
18
18
|
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
19
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
|
|
20
25
|
|
|
21
26
|
// Forward declaration of `Device` to properly resolve imports.
|
|
22
27
|
namespace margelo::nitro::healthkit { struct Device; }
|
|
@@ -91,6 +96,9 @@ namespace margelo::nitro {
|
|
|
91
96
|
return false;
|
|
92
97
|
}
|
|
93
98
|
jsi::Object obj = value.getObject(runtime);
|
|
99
|
+
if (!nitro::isPlainObject(runtime, obj)) {
|
|
100
|
+
return false;
|
|
101
|
+
}
|
|
94
102
|
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "uuid"))) return false;
|
|
95
103
|
if (!JSIConverter<std::optional<margelo::nitro::healthkit::Device>>::canConvert(runtime, obj.getProperty(runtime, "device"))) return false;
|
|
96
104
|
if (!JSIConverter<std::chrono::system_clock::time_point>::canConvert(runtime, obj.getProperty(runtime, "startDate"))) return false;
|
|
@@ -17,6 +17,11 @@
|
|
|
17
17
|
#else
|
|
18
18
|
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
19
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
|
|
20
25
|
|
|
21
26
|
// Forward declaration of `HeartbeatSeriesSample` to properly resolve imports.
|
|
22
27
|
namespace margelo::nitro::healthkit { struct HeartbeatSeriesSample; }
|
|
@@ -71,6 +76,9 @@ namespace margelo::nitro {
|
|
|
71
76
|
return false;
|
|
72
77
|
}
|
|
73
78
|
jsi::Object obj = value.getObject(runtime);
|
|
79
|
+
if (!nitro::isPlainObject(runtime, obj)) {
|
|
80
|
+
return false;
|
|
81
|
+
}
|
|
74
82
|
if (!JSIConverter<std::vector<margelo::nitro::healthkit::HeartbeatSeriesSample>>::canConvert(runtime, obj.getProperty(runtime, "samples"))) return false;
|
|
75
83
|
if (!JSIConverter<std::vector<margelo::nitro::healthkit::DeletedSample>>::canConvert(runtime, obj.getProperty(runtime, "deletedSamples"))) return false;
|
|
76
84
|
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "newAnchor"))) return false;
|
|
@@ -17,6 +17,11 @@
|
|
|
17
17
|
#else
|
|
18
18
|
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
19
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
|
|
20
25
|
|
|
21
26
|
|
|
22
27
|
|
|
@@ -62,6 +67,9 @@ namespace margelo::nitro {
|
|
|
62
67
|
return false;
|
|
63
68
|
}
|
|
64
69
|
jsi::Object obj = value.getObject(runtime);
|
|
70
|
+
if (!nitro::isPlainObject(runtime, obj)) {
|
|
71
|
+
return false;
|
|
72
|
+
}
|
|
65
73
|
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "typeIdentifier"))) return false;
|
|
66
74
|
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "unit"))) return false;
|
|
67
75
|
return true;
|
|
@@ -17,6 +17,11 @@
|
|
|
17
17
|
#else
|
|
18
18
|
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
19
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
|
|
20
25
|
|
|
21
26
|
|
|
22
27
|
|
|
@@ -71,6 +76,9 @@ namespace margelo::nitro {
|
|
|
71
76
|
return false;
|
|
72
77
|
}
|
|
73
78
|
jsi::Object obj = value.getObject(runtime);
|
|
79
|
+
if (!nitro::isPlainObject(runtime, obj)) {
|
|
80
|
+
return false;
|
|
81
|
+
}
|
|
74
82
|
if (!JSIConverter<std::optional<double>>::canConvert(runtime, obj.getProperty(runtime, "minute"))) return false;
|
|
75
83
|
if (!JSIConverter<std::optional<double>>::canConvert(runtime, obj.getProperty(runtime, "hour"))) return false;
|
|
76
84
|
if (!JSIConverter<std::optional<double>>::canConvert(runtime, obj.getProperty(runtime, "day"))) return false;
|
|
@@ -17,6 +17,11 @@
|
|
|
17
17
|
#else
|
|
18
18
|
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
19
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
|
|
20
25
|
|
|
21
26
|
|
|
22
27
|
|
|
@@ -80,6 +85,9 @@ namespace margelo::nitro {
|
|
|
80
85
|
return false;
|
|
81
86
|
}
|
|
82
87
|
jsi::Object obj = value.getObject(runtime);
|
|
88
|
+
if (!nitro::isPlainObject(runtime, obj)) {
|
|
89
|
+
return false;
|
|
90
|
+
}
|
|
83
91
|
if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, "altitude"))) return false;
|
|
84
92
|
if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, "course"))) return false;
|
|
85
93
|
if (!JSIConverter<std::chrono::system_clock::time_point>::canConvert(runtime, obj.getProperty(runtime, "date"))) return false;
|
|
@@ -225,7 +225,8 @@ namespace margelo::nitro::healthkit {
|
|
|
225
225
|
HKDATATYPEIDENTIFIERHEARTBEATSERIES SWIFT_NAME(hkdatatypeidentifierheartbeatseries) = 193,
|
|
226
226
|
HKWORKOUTROUTETYPEIDENTIFIER SWIFT_NAME(hkworkoutroutetypeidentifier) = 194,
|
|
227
227
|
HKWORKOUTTYPEIDENTIFIER SWIFT_NAME(hkworkouttypeidentifier) = 195,
|
|
228
|
-
|
|
228
|
+
HKELECTROCARDIOGRAMTYPE SWIFT_NAME(hkelectrocardiogramtype) = 196,
|
|
229
|
+
ACTIVITYSUMMARYTYPEIDENTIFIER SWIFT_NAME(activitysummarytypeidentifier) = 197,
|
|
229
230
|
} CLOSED_ENUM;
|
|
230
231
|
|
|
231
232
|
} // namespace margelo::nitro::healthkit
|
|
@@ -434,6 +435,7 @@ namespace margelo::nitro {
|
|
|
434
435
|
case hashString("HKDataTypeIdentifierHeartbeatSeries"): return margelo::nitro::healthkit::ObjectTypeIdentifier::HKDATATYPEIDENTIFIERHEARTBEATSERIES;
|
|
435
436
|
case hashString("HKWorkoutRouteTypeIdentifier"): return margelo::nitro::healthkit::ObjectTypeIdentifier::HKWORKOUTROUTETYPEIDENTIFIER;
|
|
436
437
|
case hashString("HKWorkoutTypeIdentifier"): return margelo::nitro::healthkit::ObjectTypeIdentifier::HKWORKOUTTYPEIDENTIFIER;
|
|
438
|
+
case hashString("HKElectrocardiogramType"): return margelo::nitro::healthkit::ObjectTypeIdentifier::HKELECTROCARDIOGRAMTYPE;
|
|
437
439
|
case hashString("ActivitySummaryTypeIdentifier"): return margelo::nitro::healthkit::ObjectTypeIdentifier::ACTIVITYSUMMARYTYPEIDENTIFIER;
|
|
438
440
|
default: [[unlikely]]
|
|
439
441
|
throw std::invalid_argument("Cannot convert \"" + unionValue + "\" to enum ObjectTypeIdentifier - invalid value!");
|
|
@@ -637,6 +639,7 @@ namespace margelo::nitro {
|
|
|
637
639
|
case margelo::nitro::healthkit::ObjectTypeIdentifier::HKDATATYPEIDENTIFIERHEARTBEATSERIES: return JSIConverter<std::string>::toJSI(runtime, "HKDataTypeIdentifierHeartbeatSeries");
|
|
638
640
|
case margelo::nitro::healthkit::ObjectTypeIdentifier::HKWORKOUTROUTETYPEIDENTIFIER: return JSIConverter<std::string>::toJSI(runtime, "HKWorkoutRouteTypeIdentifier");
|
|
639
641
|
case margelo::nitro::healthkit::ObjectTypeIdentifier::HKWORKOUTTYPEIDENTIFIER: return JSIConverter<std::string>::toJSI(runtime, "HKWorkoutTypeIdentifier");
|
|
642
|
+
case margelo::nitro::healthkit::ObjectTypeIdentifier::HKELECTROCARDIOGRAMTYPE: return JSIConverter<std::string>::toJSI(runtime, "HKElectrocardiogramType");
|
|
640
643
|
case margelo::nitro::healthkit::ObjectTypeIdentifier::ACTIVITYSUMMARYTYPEIDENTIFIER: return JSIConverter<std::string>::toJSI(runtime, "ActivitySummaryTypeIdentifier");
|
|
641
644
|
default: [[unlikely]]
|
|
642
645
|
throw std::invalid_argument("Cannot convert ObjectTypeIdentifier to JS - invalid value: "
|
|
@@ -845,6 +848,7 @@ namespace margelo::nitro {
|
|
|
845
848
|
case hashString("HKDataTypeIdentifierHeartbeatSeries"):
|
|
846
849
|
case hashString("HKWorkoutRouteTypeIdentifier"):
|
|
847
850
|
case hashString("HKWorkoutTypeIdentifier"):
|
|
851
|
+
case hashString("HKElectrocardiogramType"):
|
|
848
852
|
case hashString("ActivitySummaryTypeIdentifier"):
|
|
849
853
|
return true;
|
|
850
854
|
default:
|
|
@@ -17,6 +17,11 @@
|
|
|
17
17
|
#else
|
|
18
18
|
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
19
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
|
|
20
25
|
|
|
21
26
|
// Forward declaration of `SampleTypeIdentifier` to properly resolve imports.
|
|
22
27
|
namespace margelo::nitro::healthkit { enum class SampleTypeIdentifier; }
|
|
@@ -65,6 +70,9 @@ namespace margelo::nitro {
|
|
|
65
70
|
return false;
|
|
66
71
|
}
|
|
67
72
|
jsi::Object obj = value.getObject(runtime);
|
|
73
|
+
if (!nitro::isPlainObject(runtime, obj)) {
|
|
74
|
+
return false;
|
|
75
|
+
}
|
|
68
76
|
if (!JSIConverter<margelo::nitro::healthkit::SampleTypeIdentifier>::canConvert(runtime, obj.getProperty(runtime, "typeIdentifier"))) return false;
|
|
69
77
|
if (!JSIConverter<std::optional<std::string>>::canConvert(runtime, obj.getProperty(runtime, "errorMessage"))) return false;
|
|
70
78
|
return true;
|
|
@@ -17,6 +17,11 @@
|
|
|
17
17
|
#else
|
|
18
18
|
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
19
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
|
|
20
25
|
|
|
21
26
|
// Forward declaration of `PredicateWithUUID` to properly resolve imports.
|
|
22
27
|
namespace margelo::nitro::healthkit { struct PredicateWithUUID; }
|
|
@@ -80,6 +85,9 @@ namespace margelo::nitro {
|
|
|
80
85
|
return false;
|
|
81
86
|
}
|
|
82
87
|
jsi::Object obj = value.getObject(runtime);
|
|
88
|
+
if (!nitro::isPlainObject(runtime, obj)) {
|
|
89
|
+
return false;
|
|
90
|
+
}
|
|
83
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;
|
|
84
92
|
return true;
|
|
85
93
|
}
|