@kingstinct/react-native-healthkit 11.1.2 → 12.1.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.
- package/README.md +5 -3
- package/ios/CoreModule.swift +6 -6
- package/ios/Helpers.swift +5 -5
- package/ios/QuantityTypeModule.swift +5 -19
- package/ios/WorkoutsModule.swift +14 -14
- package/lib/commonjs/healthkit.ios.js +11 -6
- package/lib/commonjs/healthkit.js +12 -4
- package/lib/commonjs/hooks/useHealthkitAuthorization.js +14 -8
- package/lib/commonjs/hooks/useSubscribeToQuantitySamples.js +20 -0
- package/lib/commonjs/utils/subscribeToQuantitySamples.js +47 -0
- package/lib/module/healthkit.ios.js +6 -4
- package/lib/module/healthkit.js +11 -3
- package/lib/module/hooks/useHealthkitAuthorization.js +14 -8
- package/lib/module/hooks/useSubscribeToQuantitySamples.js +17 -0
- package/lib/module/utils/subscribeToQuantitySamples.js +43 -0
- package/lib/typescript/healthkit.d.ts +19 -9
- package/lib/typescript/healthkit.ios.d.ts +27 -18
- package/lib/typescript/hooks/useHealthkitAuthorization.d.ts +4 -1
- package/lib/typescript/hooks/useSubscribeToQuantitySamples.d.ts +3 -0
- package/lib/typescript/specs/CharacteristicTypeModule.nitro.d.ts +2 -2
- package/lib/typescript/specs/CoreModule.nitro.d.ts +7 -2
- package/lib/typescript/specs/QuantityTypeModule.nitro.d.ts +1 -1
- package/lib/typescript/specs/WorkoutProxy.nitro.d.ts +3 -11
- package/lib/typescript/specs/WorkoutsModule.nitro.d.ts +1 -1
- package/lib/typescript/types/Device.d.ts +8 -8
- package/lib/typescript/types/Source.d.ts +2 -2
- package/lib/typescript/types/Subscriptions.d.ts +14 -1
- package/lib/typescript/types/Workouts.d.ts +1 -1
- package/lib/typescript/utils/subscribeToQuantitySamples.d.ts +5 -0
- package/nitrogen/generated/ios/ReactNativeHealthkit-Swift-Cxx-Bridge.hpp +94 -55
- package/nitrogen/generated/ios/ReactNativeHealthkit-Swift-Cxx-Umbrella.hpp +3 -2
- package/nitrogen/generated/ios/c++/HybridCategoryTypeModuleSpecSwift.hpp +3 -2
- package/nitrogen/generated/ios/c++/HybridCharacteristicTypeModuleSpecSwift.hpp +3 -0
- package/nitrogen/generated/ios/c++/HybridCoreModuleSpecSwift.hpp +10 -4
- package/nitrogen/generated/ios/c++/HybridCorrelationTypeModuleSpecSwift.hpp +3 -2
- package/nitrogen/generated/ios/c++/HybridElectrocardiogramModuleSpecSwift.hpp +3 -2
- package/nitrogen/generated/ios/c++/HybridHeartbeatSeriesModuleSpecSwift.hpp +3 -2
- package/nitrogen/generated/ios/c++/HybridQuantityTypeModuleSpecSwift.hpp +4 -3
- package/nitrogen/generated/ios/c++/HybridSourceProxySpecSwift.hpp +3 -0
- package/nitrogen/generated/ios/c++/HybridStateOfMindModuleSpecSwift.hpp +3 -2
- package/nitrogen/generated/ios/c++/HybridWorkoutProxySpecSwift.hpp +7 -22
- package/nitrogen/generated/ios/c++/HybridWorkoutsModuleSpecSwift.hpp +5 -4
- package/nitrogen/generated/ios/swift/AuthDataTypes.swift +108 -0
- package/nitrogen/generated/ios/swift/ECGQueryOptionsWithSortOrder.swift +16 -2
- package/nitrogen/generated/ios/swift/HybridCategoryTypeModuleSpec.swift +8 -0
- package/nitrogen/generated/ios/swift/HybridCategoryTypeModuleSpec_cxx.swift +10 -1
- package/nitrogen/generated/ios/swift/HybridCharacteristicTypeModuleSpec.swift +8 -0
- package/nitrogen/generated/ios/swift/HybridCharacteristicTypeModuleSpec_cxx.swift +10 -1
- package/nitrogen/generated/ios/swift/HybridCoreModuleSpec.swift +10 -2
- package/nitrogen/generated/ios/swift/HybridCoreModuleSpec_cxx.swift +24 -36
- package/nitrogen/generated/ios/swift/HybridCorrelationTypeModuleSpec.swift +8 -0
- package/nitrogen/generated/ios/swift/HybridCorrelationTypeModuleSpec_cxx.swift +10 -1
- package/nitrogen/generated/ios/swift/HybridElectrocardiogramModuleSpec.swift +8 -0
- package/nitrogen/generated/ios/swift/HybridElectrocardiogramModuleSpec_cxx.swift +10 -1
- package/nitrogen/generated/ios/swift/HybridHeartbeatSeriesModuleSpec.swift +8 -0
- package/nitrogen/generated/ios/swift/HybridHeartbeatSeriesModuleSpec_cxx.swift +10 -1
- package/nitrogen/generated/ios/swift/HybridQuantityTypeModuleSpec.swift +9 -1
- package/nitrogen/generated/ios/swift/HybridQuantityTypeModuleSpec_cxx.swift +13 -12
- package/nitrogen/generated/ios/swift/HybridSourceProxySpec.swift +7 -0
- package/nitrogen/generated/ios/swift/HybridSourceProxySpec_cxx.swift +9 -1
- package/nitrogen/generated/ios/swift/HybridStateOfMindModuleSpec.swift +8 -0
- package/nitrogen/generated/ios/swift/HybridStateOfMindModuleSpec_cxx.swift +11 -10
- package/nitrogen/generated/ios/swift/HybridWorkoutProxySpec.swift +8 -4
- package/nitrogen/generated/ios/swift/HybridWorkoutProxySpec_cxx.swift +10 -53
- package/nitrogen/generated/ios/swift/HybridWorkoutsModuleSpec.swift +9 -1
- package/nitrogen/generated/ios/swift/HybridWorkoutsModuleSpec_cxx.swift +19 -3
- package/nitrogen/generated/ios/swift/PredicateWithMetadataKey.swift +21 -21
- package/nitrogen/generated/ios/swift/PredicateWithStartAndEnd.swift +16 -2
- package/nitrogen/generated/ios/swift/QueryOptionsWithSortOrder.swift +8 -1
- package/nitrogen/generated/ios/swift/QueryOptionsWithSortOrderAndUnit.swift +8 -1
- package/nitrogen/generated/ios/swift/StateOfMindSample.swift +29 -21
- package/nitrogen/generated/ios/swift/{Variant_String_Double_Bool_Date.swift → Variant_Bool_String_Double_Date.swift} +6 -6
- package/nitrogen/generated/ios/swift/WorkoutQueryOptions.swift +8 -1
- package/nitrogen/generated/shared/c++/AuthDataTypes.hpp +85 -0
- package/nitrogen/generated/shared/c++/CategorySample.hpp +0 -2
- package/nitrogen/generated/shared/c++/CategorySampleForSaving.hpp +0 -2
- package/nitrogen/generated/shared/c++/CorrelationSample.hpp +0 -2
- package/nitrogen/generated/shared/c++/DeletedSample.hpp +1 -2
- package/nitrogen/generated/shared/c++/ElectrocardiogramSample.hpp +0 -2
- package/nitrogen/generated/shared/c++/HeartbeatSeriesSample.hpp +0 -2
- package/nitrogen/generated/shared/c++/HybridCategoryTypeModuleSpec.hpp +0 -2
- package/nitrogen/generated/shared/c++/HybridCoreModuleSpec.hpp +5 -5
- package/nitrogen/generated/shared/c++/HybridCorrelationTypeModuleSpec.hpp +0 -2
- package/nitrogen/generated/shared/c++/HybridQuantityTypeModuleSpec.hpp +1 -3
- package/nitrogen/generated/shared/c++/HybridStateOfMindModuleSpec.hpp +0 -2
- package/nitrogen/generated/shared/c++/HybridWorkoutProxySpec.cpp +0 -4
- package/nitrogen/generated/shared/c++/HybridWorkoutProxySpec.hpp +4 -10
- package/nitrogen/generated/shared/c++/HybridWorkoutsModuleSpec.hpp +2 -3
- package/nitrogen/generated/shared/c++/PredicateWithMetadataKey.hpp +5 -5
- package/nitrogen/generated/shared/c++/QuantitySample.hpp +0 -2
- package/nitrogen/generated/shared/c++/QuantitySampleForSaving.hpp +0 -2
- package/nitrogen/generated/shared/c++/StateOfMindSample.hpp +0 -2
- package/nitrogen/generated/shared/c++/WorkoutSample.hpp +0 -2
- package/package.json +7 -7
- package/src/healthkit.ios.ts +11 -6
- package/src/healthkit.ts +19 -6
- package/src/hooks/useHealthkitAuthorization.test.ts +12 -4
- package/src/hooks/useHealthkitAuthorization.ts +20 -14
- package/src/hooks/useSubscribeToQuantitySamples.ts +31 -0
- package/src/specs/CategoryTypeModule.nitro.ts +1 -1
- package/src/specs/CharacteristicTypeModule.nitro.ts +2 -2
- package/src/specs/CoreModule.nitro.ts +8 -6
- package/src/specs/QuantityTypeModule.nitro.ts +1 -1
- package/src/specs/WorkoutProxy.nitro.ts +3 -16
- package/src/specs/WorkoutsModule.nitro.ts +2 -2
- package/src/types/Device.ts +8 -8
- package/src/types/InterfaceVerificationExample.ts +2 -2
- package/src/types/Source.ts +2 -2
- package/src/types/Subscriptions.ts +19 -1
- package/src/types/Workouts.ts +1 -1
- package/src/utils/subscribeToQuantitySamples.ts +63 -0
|
@@ -76,7 +76,7 @@ open class HybridSourceProxySpec_cxx {
|
|
|
76
76
|
*/
|
|
77
77
|
public func getCxxPart() -> bridge.std__shared_ptr_HybridSourceProxySpec_ {
|
|
78
78
|
let cachedCxxPart = self.__cxxPart.lock()
|
|
79
|
-
if cachedCxxPart
|
|
79
|
+
if Bool(fromCxx: cachedCxxPart) {
|
|
80
80
|
return cachedCxxPart
|
|
81
81
|
} else {
|
|
82
82
|
let newCxxPart = bridge.create_std__shared_ptr_HybridSourceProxySpec_(self.toUnsafe())
|
|
@@ -105,6 +105,14 @@ open class HybridSourceProxySpec_cxx {
|
|
|
105
105
|
self.__implementation.dispose()
|
|
106
106
|
}
|
|
107
107
|
|
|
108
|
+
/**
|
|
109
|
+
* Call toString() on the Swift class.
|
|
110
|
+
*/
|
|
111
|
+
@inline(__always)
|
|
112
|
+
public func toString() -> String {
|
|
113
|
+
return self.__implementation.toString()
|
|
114
|
+
}
|
|
115
|
+
|
|
108
116
|
// Properties
|
|
109
117
|
public final var bundleIdentifier: std.string {
|
|
110
118
|
@inline(__always)
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
import Foundation
|
|
9
9
|
import NitroModules
|
|
10
|
+
import NitroModules
|
|
10
11
|
|
|
11
12
|
/// See ``HybridStateOfMindModuleSpec``
|
|
12
13
|
public protocol HybridStateOfMindModuleSpec_protocol: HybridObject {
|
|
@@ -18,6 +19,13 @@ public protocol HybridStateOfMindModuleSpec_protocol: HybridObject {
|
|
|
18
19
|
func saveStateOfMindSample(date: Date, kind: StateOfMindKind, valence: Double, labels: [StateOfMindLabel], associations: [StateOfMindAssociation], metadata: AnyMap?) throws -> Promise<Bool>
|
|
19
20
|
}
|
|
20
21
|
|
|
22
|
+
public extension HybridStateOfMindModuleSpec_protocol {
|
|
23
|
+
/// Default implementation of ``HybridObject.toString``
|
|
24
|
+
func toString() -> String {
|
|
25
|
+
return "[HybridObject StateOfMindModule]"
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
21
29
|
/// See ``HybridStateOfMindModuleSpec``
|
|
22
30
|
open class HybridStateOfMindModuleSpec_base {
|
|
23
31
|
private weak var cxxWrapper: HybridStateOfMindModuleSpec_cxx? = nil
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
import Foundation
|
|
9
9
|
import NitroModules
|
|
10
|
+
import NitroModules
|
|
10
11
|
|
|
11
12
|
/**
|
|
12
13
|
* A class implementation that bridges HybridStateOfMindModuleSpec over to C++.
|
|
@@ -76,7 +77,7 @@ open class HybridStateOfMindModuleSpec_cxx {
|
|
|
76
77
|
*/
|
|
77
78
|
public func getCxxPart() -> bridge.std__shared_ptr_HybridStateOfMindModuleSpec_ {
|
|
78
79
|
let cachedCxxPart = self.__cxxPart.lock()
|
|
79
|
-
if cachedCxxPart
|
|
80
|
+
if Bool(fromCxx: cachedCxxPart) {
|
|
80
81
|
return cachedCxxPart
|
|
81
82
|
} else {
|
|
82
83
|
let newCxxPart = bridge.create_std__shared_ptr_HybridStateOfMindModuleSpec_(self.toUnsafe())
|
|
@@ -105,6 +106,14 @@ open class HybridStateOfMindModuleSpec_cxx {
|
|
|
105
106
|
self.__implementation.dispose()
|
|
106
107
|
}
|
|
107
108
|
|
|
109
|
+
/**
|
|
110
|
+
* Call toString() on the Swift class.
|
|
111
|
+
*/
|
|
112
|
+
@inline(__always)
|
|
113
|
+
public func toString() -> String {
|
|
114
|
+
return self.__implementation.toString()
|
|
115
|
+
}
|
|
116
|
+
|
|
108
117
|
// Properties
|
|
109
118
|
|
|
110
119
|
|
|
@@ -137,15 +146,7 @@ open class HybridStateOfMindModuleSpec_cxx {
|
|
|
137
146
|
@inline(__always)
|
|
138
147
|
public final func saveStateOfMindSample(date: margelo.nitro.chrono_time, kind: Int32, valence: Double, labels: bridge.std__vector_StateOfMindLabel_, associations: bridge.std__vector_StateOfMindAssociation_, metadata: bridge.std__optional_std__shared_ptr_AnyMap__) -> bridge.Result_std__shared_ptr_Promise_bool___ {
|
|
139
148
|
do {
|
|
140
|
-
let __result = try self.__implementation.saveStateOfMindSample(date: Date(fromChrono: date), kind: margelo.nitro.healthkit.StateOfMindKind(rawValue: kind)!, valence: valence, labels: { () ->
|
|
141
|
-
let __data = bridge.get_data_std__vector_StateOfMindLabel_(labels)
|
|
142
|
-
let __size = labels.size()
|
|
143
|
-
return Array(UnsafeBufferPointer(start: __data, count: __size))
|
|
144
|
-
}(), associations: { () -> [StateOfMindAssociation] in
|
|
145
|
-
let __data = bridge.get_data_std__vector_StateOfMindAssociation_(associations)
|
|
146
|
-
let __size = associations.size()
|
|
147
|
-
return Array(UnsafeBufferPointer(start: __data, count: __size))
|
|
148
|
-
}(), metadata: { () -> AnyMap? in
|
|
149
|
+
let __result = try self.__implementation.saveStateOfMindSample(date: Date(fromChrono: date), kind: margelo.nitro.healthkit.StateOfMindKind(rawValue: kind)!, valence: valence, labels: labels.map({ __item in __item }), associations: associations.map({ __item in __item }), metadata: { () -> AnyMap? in
|
|
149
150
|
if bridge.has_value_std__optional_std__shared_ptr_AnyMap__(metadata) {
|
|
150
151
|
let __unwrapped = bridge.get_std__optional_std__shared_ptr_AnyMap__(metadata)
|
|
151
152
|
return AnyMap(withCppPart: __unwrapped)
|
|
@@ -7,14 +7,11 @@
|
|
|
7
7
|
|
|
8
8
|
import Foundation
|
|
9
9
|
import NitroModules
|
|
10
|
+
import NitroModules
|
|
10
11
|
|
|
11
12
|
/// See ``HybridWorkoutProxySpec``
|
|
12
13
|
public protocol HybridWorkoutProxySpec_protocol: HybridObject {
|
|
13
14
|
// Properties
|
|
14
|
-
var totalDistance: Quantity? { get }
|
|
15
|
-
var totalEnergyBurned: Quantity? { get }
|
|
16
|
-
var totalSwimmingStrokeCount: Quantity? { get }
|
|
17
|
-
var totalFlightsClimbed: Quantity? { get }
|
|
18
15
|
var uuid: String { get }
|
|
19
16
|
var device: Device? { get }
|
|
20
17
|
var workoutActivityType: WorkoutActivityType { get }
|
|
@@ -35,6 +32,13 @@ public protocol HybridWorkoutProxySpec_protocol: HybridObject {
|
|
|
35
32
|
func getAllStatistics() throws -> Promise<Dictionary<String, QueryStatisticsResponse>>
|
|
36
33
|
}
|
|
37
34
|
|
|
35
|
+
public extension HybridWorkoutProxySpec_protocol {
|
|
36
|
+
/// Default implementation of ``HybridObject.toString``
|
|
37
|
+
func toString() -> String {
|
|
38
|
+
return "[HybridObject WorkoutProxy]"
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
38
42
|
/// See ``HybridWorkoutProxySpec``
|
|
39
43
|
open class HybridWorkoutProxySpec_base {
|
|
40
44
|
private weak var cxxWrapper: HybridWorkoutProxySpec_cxx? = nil
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
import Foundation
|
|
9
9
|
import NitroModules
|
|
10
|
+
import NitroModules
|
|
10
11
|
|
|
11
12
|
/**
|
|
12
13
|
* A class implementation that bridges HybridWorkoutProxySpec over to C++.
|
|
@@ -76,7 +77,7 @@ open class HybridWorkoutProxySpec_cxx {
|
|
|
76
77
|
*/
|
|
77
78
|
public func getCxxPart() -> bridge.std__shared_ptr_HybridWorkoutProxySpec_ {
|
|
78
79
|
let cachedCxxPart = self.__cxxPart.lock()
|
|
79
|
-
if cachedCxxPart
|
|
80
|
+
if Bool(fromCxx: cachedCxxPart) {
|
|
80
81
|
return cachedCxxPart
|
|
81
82
|
} else {
|
|
82
83
|
let newCxxPart = bridge.create_std__shared_ptr_HybridWorkoutProxySpec_(self.toUnsafe())
|
|
@@ -105,59 +106,15 @@ open class HybridWorkoutProxySpec_cxx {
|
|
|
105
106
|
self.__implementation.dispose()
|
|
106
107
|
}
|
|
107
108
|
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
return bridge.create_std__optional_Quantity_(__unwrappedValue)
|
|
115
|
-
} else {
|
|
116
|
-
return .init()
|
|
117
|
-
}
|
|
118
|
-
}()
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
public final var totalEnergyBurned: bridge.std__optional_Quantity_ {
|
|
123
|
-
@inline(__always)
|
|
124
|
-
get {
|
|
125
|
-
return { () -> bridge.std__optional_Quantity_ in
|
|
126
|
-
if let __unwrappedValue = self.__implementation.totalEnergyBurned {
|
|
127
|
-
return bridge.create_std__optional_Quantity_(__unwrappedValue)
|
|
128
|
-
} else {
|
|
129
|
-
return .init()
|
|
130
|
-
}
|
|
131
|
-
}()
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
public final var totalSwimmingStrokeCount: bridge.std__optional_Quantity_ {
|
|
136
|
-
@inline(__always)
|
|
137
|
-
get {
|
|
138
|
-
return { () -> bridge.std__optional_Quantity_ in
|
|
139
|
-
if let __unwrappedValue = self.__implementation.totalSwimmingStrokeCount {
|
|
140
|
-
return bridge.create_std__optional_Quantity_(__unwrappedValue)
|
|
141
|
-
} else {
|
|
142
|
-
return .init()
|
|
143
|
-
}
|
|
144
|
-
}()
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
public final var totalFlightsClimbed: bridge.std__optional_Quantity_ {
|
|
149
|
-
@inline(__always)
|
|
150
|
-
get {
|
|
151
|
-
return { () -> bridge.std__optional_Quantity_ in
|
|
152
|
-
if let __unwrappedValue = self.__implementation.totalFlightsClimbed {
|
|
153
|
-
return bridge.create_std__optional_Quantity_(__unwrappedValue)
|
|
154
|
-
} else {
|
|
155
|
-
return .init()
|
|
156
|
-
}
|
|
157
|
-
}()
|
|
158
|
-
}
|
|
109
|
+
/**
|
|
110
|
+
* Call toString() on the Swift class.
|
|
111
|
+
*/
|
|
112
|
+
@inline(__always)
|
|
113
|
+
public func toString() -> String {
|
|
114
|
+
return self.__implementation.toString()
|
|
159
115
|
}
|
|
160
|
-
|
|
116
|
+
|
|
117
|
+
// Properties
|
|
161
118
|
public final var uuid: std.string {
|
|
162
119
|
@inline(__always)
|
|
163
120
|
get {
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
import Foundation
|
|
9
9
|
import NitroModules
|
|
10
|
+
import NitroModules
|
|
10
11
|
|
|
11
12
|
/// See ``HybridWorkoutsModuleSpec``
|
|
12
13
|
public protocol HybridWorkoutsModuleSpec_protocol: HybridObject {
|
|
@@ -14,12 +15,19 @@ public protocol HybridWorkoutsModuleSpec_protocol: HybridObject {
|
|
|
14
15
|
|
|
15
16
|
|
|
16
17
|
// Methods
|
|
17
|
-
func saveWorkoutSample(workoutActivityType: WorkoutActivityType, quantities: [QuantitySampleForSaving], startDate: Date, endDate: Date, totals: WorkoutTotals
|
|
18
|
+
func saveWorkoutSample(workoutActivityType: WorkoutActivityType, quantities: [QuantitySampleForSaving], startDate: Date, endDate: Date, totals: WorkoutTotals?, metadata: AnyMap?) throws -> Promise<(any HybridWorkoutProxySpec)>
|
|
18
19
|
func queryWorkoutSamplesWithAnchor(options: WorkoutQueryOptionsWithAnchor) throws -> Promise<QueryWorkoutSamplesWithAnchorResponse>
|
|
19
20
|
func queryWorkoutSamples(options: WorkoutQueryOptions) throws -> Promise<[(any HybridWorkoutProxySpec)]>
|
|
20
21
|
func startWatchAppWithWorkoutConfiguration(workoutConfiguration: WorkoutConfiguration) throws -> Promise<Bool>
|
|
21
22
|
}
|
|
22
23
|
|
|
24
|
+
public extension HybridWorkoutsModuleSpec_protocol {
|
|
25
|
+
/// Default implementation of ``HybridObject.toString``
|
|
26
|
+
func toString() -> String {
|
|
27
|
+
return "[HybridObject WorkoutsModule]"
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
23
31
|
/// See ``HybridWorkoutsModuleSpec``
|
|
24
32
|
open class HybridWorkoutsModuleSpec_base {
|
|
25
33
|
private weak var cxxWrapper: HybridWorkoutsModuleSpec_cxx? = nil
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
import Foundation
|
|
9
9
|
import NitroModules
|
|
10
|
+
import NitroModules
|
|
10
11
|
|
|
11
12
|
/**
|
|
12
13
|
* A class implementation that bridges HybridWorkoutsModuleSpec over to C++.
|
|
@@ -76,7 +77,7 @@ open class HybridWorkoutsModuleSpec_cxx {
|
|
|
76
77
|
*/
|
|
77
78
|
public func getCxxPart() -> bridge.std__shared_ptr_HybridWorkoutsModuleSpec_ {
|
|
78
79
|
let cachedCxxPart = self.__cxxPart.lock()
|
|
79
|
-
if cachedCxxPart
|
|
80
|
+
if Bool(fromCxx: cachedCxxPart) {
|
|
80
81
|
return cachedCxxPart
|
|
81
82
|
} else {
|
|
82
83
|
let newCxxPart = bridge.create_std__shared_ptr_HybridWorkoutsModuleSpec_(self.toUnsafe())
|
|
@@ -105,14 +106,29 @@ open class HybridWorkoutsModuleSpec_cxx {
|
|
|
105
106
|
self.__implementation.dispose()
|
|
106
107
|
}
|
|
107
108
|
|
|
109
|
+
/**
|
|
110
|
+
* Call toString() on the Swift class.
|
|
111
|
+
*/
|
|
112
|
+
@inline(__always)
|
|
113
|
+
public func toString() -> String {
|
|
114
|
+
return self.__implementation.toString()
|
|
115
|
+
}
|
|
116
|
+
|
|
108
117
|
// Properties
|
|
109
118
|
|
|
110
119
|
|
|
111
120
|
// Methods
|
|
112
121
|
@inline(__always)
|
|
113
|
-
public final func saveWorkoutSample(workoutActivityType: Int32, quantities: bridge.std__vector_QuantitySampleForSaving_, startDate: margelo.nitro.chrono_time, endDate: margelo.nitro.chrono_time, totals:
|
|
122
|
+
public final func saveWorkoutSample(workoutActivityType: Int32, quantities: bridge.std__vector_QuantitySampleForSaving_, startDate: margelo.nitro.chrono_time, endDate: margelo.nitro.chrono_time, totals: bridge.std__optional_WorkoutTotals_, metadata: bridge.std__optional_std__shared_ptr_AnyMap__) -> bridge.Result_std__shared_ptr_Promise_std__shared_ptr_HybridWorkoutProxySpec____ {
|
|
114
123
|
do {
|
|
115
|
-
let __result = try self.__implementation.saveWorkoutSample(workoutActivityType: margelo.nitro.healthkit.WorkoutActivityType(rawValue: workoutActivityType)!, quantities: quantities.map({ __item in __item }), startDate: Date(fromChrono: startDate), endDate: Date(fromChrono: endDate), totals: totals, metadata:
|
|
124
|
+
let __result = try self.__implementation.saveWorkoutSample(workoutActivityType: margelo.nitro.healthkit.WorkoutActivityType(rawValue: workoutActivityType)!, quantities: quantities.map({ __item in __item }), startDate: Date(fromChrono: startDate), endDate: Date(fromChrono: endDate), totals: totals.value, metadata: { () -> AnyMap? in
|
|
125
|
+
if bridge.has_value_std__optional_std__shared_ptr_AnyMap__(metadata) {
|
|
126
|
+
let __unwrapped = bridge.get_std__optional_std__shared_ptr_AnyMap__(metadata)
|
|
127
|
+
return AnyMap(withCppPart: __unwrapped)
|
|
128
|
+
} else {
|
|
129
|
+
return nil
|
|
130
|
+
}
|
|
131
|
+
}())
|
|
116
132
|
let __resultCpp = { () -> bridge.std__shared_ptr_Promise_std__shared_ptr_HybridWorkoutProxySpec___ in
|
|
117
133
|
let __promise = bridge.create_std__shared_ptr_Promise_std__shared_ptr_HybridWorkoutProxySpec___()
|
|
118
134
|
let __promiseHolder = bridge.wrap_std__shared_ptr_Promise_std__shared_ptr_HybridWorkoutProxySpec___(__promise)
|
|
@@ -18,25 +18,25 @@ public extension PredicateWithMetadataKey {
|
|
|
18
18
|
/**
|
|
19
19
|
* Create a new instance of `PredicateWithMetadataKey`.
|
|
20
20
|
*/
|
|
21
|
-
init(withMetadataKey: String, operatorType: PredicateWithMetadataOperator?, value:
|
|
21
|
+
init(withMetadataKey: String, operatorType: PredicateWithMetadataOperator?, value: Variant_Bool_String_Double_Date?) {
|
|
22
22
|
self.init(std.string(withMetadataKey), { () -> bridge.std__optional_PredicateWithMetadataOperator_ in
|
|
23
23
|
if let __unwrappedValue = operatorType {
|
|
24
24
|
return bridge.create_std__optional_PredicateWithMetadataOperator_(__unwrappedValue)
|
|
25
25
|
} else {
|
|
26
26
|
return .init()
|
|
27
27
|
}
|
|
28
|
-
}(), { () -> bridge.
|
|
28
|
+
}(), { () -> bridge.std__optional_std__variant_bool__std__string__double__std__chrono__system_clock__time_point__ in
|
|
29
29
|
if let __unwrappedValue = value {
|
|
30
|
-
return bridge.
|
|
30
|
+
return bridge.create_std__optional_std__variant_bool__std__string__double__std__chrono__system_clock__time_point__({ () -> bridge.std__variant_bool__std__string__double__std__chrono__system_clock__time_point_ in
|
|
31
31
|
switch __unwrappedValue {
|
|
32
32
|
case .first(let __value):
|
|
33
|
-
return bridge.
|
|
33
|
+
return bridge.create_std__variant_bool__std__string__double__std__chrono__system_clock__time_point_(__value)
|
|
34
34
|
case .second(let __value):
|
|
35
|
-
return bridge.
|
|
35
|
+
return bridge.create_std__variant_bool__std__string__double__std__chrono__system_clock__time_point_(std.string(__value))
|
|
36
36
|
case .third(let __value):
|
|
37
|
-
return bridge.
|
|
37
|
+
return bridge.create_std__variant_bool__std__string__double__std__chrono__system_clock__time_point_(__value)
|
|
38
38
|
case .fourth(let __value):
|
|
39
|
-
return bridge.
|
|
39
|
+
return bridge.create_std__variant_bool__std__string__double__std__chrono__system_clock__time_point_(__value.toCpp())
|
|
40
40
|
}
|
|
41
41
|
}().variant)
|
|
42
42
|
} else {
|
|
@@ -73,21 +73,21 @@ public extension PredicateWithMetadataKey {
|
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
75
|
|
|
76
|
-
var value:
|
|
76
|
+
var value: Variant_Bool_String_Double_Date? {
|
|
77
77
|
@inline(__always)
|
|
78
78
|
get {
|
|
79
|
-
return { () ->
|
|
80
|
-
if bridge.
|
|
81
|
-
let __unwrapped = bridge.
|
|
82
|
-
return { () ->
|
|
83
|
-
let __variant = bridge.
|
|
79
|
+
return { () -> Variant_Bool_String_Double_Date? in
|
|
80
|
+
if bridge.has_value_std__optional_std__variant_bool__std__string__double__std__chrono__system_clock__time_point__(self.__value) {
|
|
81
|
+
let __unwrapped = bridge.get_std__optional_std__variant_bool__std__string__double__std__chrono__system_clock__time_point__(self.__value)
|
|
82
|
+
return { () -> Variant_Bool_String_Double_Date in
|
|
83
|
+
let __variant = bridge.std__variant_bool__std__string__double__std__chrono__system_clock__time_point_(__unwrapped)
|
|
84
84
|
switch __variant.index() {
|
|
85
85
|
case 0:
|
|
86
86
|
let __actual = __variant.get_0()
|
|
87
|
-
return .first(
|
|
87
|
+
return .first(__actual)
|
|
88
88
|
case 1:
|
|
89
89
|
let __actual = __variant.get_1()
|
|
90
|
-
return .second(__actual)
|
|
90
|
+
return .second(String(__actual))
|
|
91
91
|
case 2:
|
|
92
92
|
let __actual = __variant.get_2()
|
|
93
93
|
return .third(__actual)
|
|
@@ -105,18 +105,18 @@ public extension PredicateWithMetadataKey {
|
|
|
105
105
|
}
|
|
106
106
|
@inline(__always)
|
|
107
107
|
set {
|
|
108
|
-
self.__value = { () -> bridge.
|
|
108
|
+
self.__value = { () -> bridge.std__optional_std__variant_bool__std__string__double__std__chrono__system_clock__time_point__ in
|
|
109
109
|
if let __unwrappedValue = newValue {
|
|
110
|
-
return bridge.
|
|
110
|
+
return bridge.create_std__optional_std__variant_bool__std__string__double__std__chrono__system_clock__time_point__({ () -> bridge.std__variant_bool__std__string__double__std__chrono__system_clock__time_point_ in
|
|
111
111
|
switch __unwrappedValue {
|
|
112
112
|
case .first(let __value):
|
|
113
|
-
return bridge.
|
|
113
|
+
return bridge.create_std__variant_bool__std__string__double__std__chrono__system_clock__time_point_(__value)
|
|
114
114
|
case .second(let __value):
|
|
115
|
-
return bridge.
|
|
115
|
+
return bridge.create_std__variant_bool__std__string__double__std__chrono__system_clock__time_point_(std.string(__value))
|
|
116
116
|
case .third(let __value):
|
|
117
|
-
return bridge.
|
|
117
|
+
return bridge.create_std__variant_bool__std__string__double__std__chrono__system_clock__time_point_(__value)
|
|
118
118
|
case .fourth(let __value):
|
|
119
|
-
return bridge.
|
|
119
|
+
return bridge.create_std__variant_bool__std__string__double__std__chrono__system_clock__time_point_(__value.toCpp())
|
|
120
120
|
}
|
|
121
121
|
}().variant)
|
|
122
122
|
} else {
|
|
@@ -97,7 +97,14 @@ public extension PredicateWithStartAndEnd {
|
|
|
97
97
|
var strictEndDate: Bool? {
|
|
98
98
|
@inline(__always)
|
|
99
99
|
get {
|
|
100
|
-
return
|
|
100
|
+
return { () -> Bool? in
|
|
101
|
+
if bridge.has_value_std__optional_bool_(self.__strictEndDate) {
|
|
102
|
+
let __unwrapped = bridge.get_std__optional_bool_(self.__strictEndDate)
|
|
103
|
+
return __unwrapped
|
|
104
|
+
} else {
|
|
105
|
+
return nil
|
|
106
|
+
}
|
|
107
|
+
}()
|
|
101
108
|
}
|
|
102
109
|
@inline(__always)
|
|
103
110
|
set {
|
|
@@ -114,7 +121,14 @@ public extension PredicateWithStartAndEnd {
|
|
|
114
121
|
var strictStartDate: Bool? {
|
|
115
122
|
@inline(__always)
|
|
116
123
|
get {
|
|
117
|
-
return
|
|
124
|
+
return { () -> Bool? in
|
|
125
|
+
if bridge.has_value_std__optional_bool_(self.__strictStartDate) {
|
|
126
|
+
let __unwrapped = bridge.get_std__optional_bool_(self.__strictStartDate)
|
|
127
|
+
return __unwrapped
|
|
128
|
+
} else {
|
|
129
|
+
return nil
|
|
130
|
+
}
|
|
131
|
+
}()
|
|
118
132
|
}
|
|
119
133
|
@inline(__always)
|
|
120
134
|
set {
|
|
@@ -60,7 +60,14 @@ public extension QueryOptionsWithSortOrder {
|
|
|
60
60
|
var ascending: Bool? {
|
|
61
61
|
@inline(__always)
|
|
62
62
|
get {
|
|
63
|
-
return
|
|
63
|
+
return { () -> Bool? in
|
|
64
|
+
if bridge.has_value_std__optional_bool_(self.__ascending) {
|
|
65
|
+
let __unwrapped = bridge.get_std__optional_bool_(self.__ascending)
|
|
66
|
+
return __unwrapped
|
|
67
|
+
} else {
|
|
68
|
+
return nil
|
|
69
|
+
}
|
|
70
|
+
}()
|
|
64
71
|
}
|
|
65
72
|
@inline(__always)
|
|
66
73
|
set {
|
|
@@ -90,7 +90,14 @@ public extension QueryOptionsWithSortOrderAndUnit {
|
|
|
90
90
|
var ascending: Bool? {
|
|
91
91
|
@inline(__always)
|
|
92
92
|
get {
|
|
93
|
-
return
|
|
93
|
+
return { () -> Bool? in
|
|
94
|
+
if bridge.has_value_std__optional_bool_(self.__ascending) {
|
|
95
|
+
let __unwrapped = bridge.get_std__optional_bool_(self.__ascending)
|
|
96
|
+
return __unwrapped
|
|
97
|
+
} else {
|
|
98
|
+
return nil
|
|
99
|
+
}
|
|
100
|
+
}()
|
|
94
101
|
}
|
|
95
102
|
@inline(__always)
|
|
96
103
|
set {
|
|
@@ -37,11 +37,19 @@ public extension StateOfMindSample {
|
|
|
37
37
|
} else {
|
|
38
38
|
return .init()
|
|
39
39
|
}
|
|
40
|
-
}(), valence, kind, valenceClassification,
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
40
|
+
}(), valence, kind, valenceClassification, { () -> bridge.std__vector_StateOfMindAssociation_ in
|
|
41
|
+
var __vector = bridge.create_std__vector_StateOfMindAssociation_(associations.count)
|
|
42
|
+
for __item in associations {
|
|
43
|
+
__vector.push_back(__item)
|
|
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
|
+
}())
|
|
45
53
|
}
|
|
46
54
|
|
|
47
55
|
var uuid: String {
|
|
@@ -171,34 +179,34 @@ public extension StateOfMindSample {
|
|
|
171
179
|
var associations: [StateOfMindAssociation] {
|
|
172
180
|
@inline(__always)
|
|
173
181
|
get {
|
|
174
|
-
return {
|
|
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
|
-
}()
|
|
182
|
+
return self.__associations.map({ __item in __item })
|
|
179
183
|
}
|
|
180
184
|
@inline(__always)
|
|
181
185
|
set {
|
|
182
|
-
self.__associations =
|
|
183
|
-
|
|
184
|
-
|
|
186
|
+
self.__associations = { () -> bridge.std__vector_StateOfMindAssociation_ in
|
|
187
|
+
var __vector = bridge.create_std__vector_StateOfMindAssociation_(newValue.count)
|
|
188
|
+
for __item in newValue {
|
|
189
|
+
__vector.push_back(__item)
|
|
190
|
+
}
|
|
191
|
+
return __vector
|
|
192
|
+
}()
|
|
185
193
|
}
|
|
186
194
|
}
|
|
187
195
|
|
|
188
196
|
var labels: [StateOfMindLabel] {
|
|
189
197
|
@inline(__always)
|
|
190
198
|
get {
|
|
191
|
-
return {
|
|
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
|
-
}()
|
|
199
|
+
return self.__labels.map({ __item in __item })
|
|
196
200
|
}
|
|
197
201
|
@inline(__always)
|
|
198
202
|
set {
|
|
199
|
-
self.__labels =
|
|
200
|
-
|
|
201
|
-
|
|
203
|
+
self.__labels = { () -> bridge.std__vector_StateOfMindLabel_ in
|
|
204
|
+
var __vector = bridge.create_std__vector_StateOfMindLabel_(newValue.count)
|
|
205
|
+
for __item in newValue {
|
|
206
|
+
__vector.push_back(__item)
|
|
207
|
+
}
|
|
208
|
+
return __vector
|
|
209
|
+
}()
|
|
202
210
|
}
|
|
203
211
|
}
|
|
204
212
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
///
|
|
2
|
-
///
|
|
2
|
+
/// Variant_Bool_String_Double_Date.swift
|
|
3
3
|
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
4
|
/// https://github.com/mrousavy/nitro
|
|
5
5
|
/// Copyright © 2025 Marc Rousavy @ Margelo
|
|
@@ -9,12 +9,12 @@
|
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
* An Swift enum with associated values representing a Variant/Union type.
|
|
12
|
-
* JS type: `
|
|
12
|
+
* JS type: `boolean | string | number | date`
|
|
13
13
|
*/
|
|
14
14
|
@frozen
|
|
15
|
-
public indirect enum
|
|
16
|
-
case first(
|
|
17
|
-
case second(
|
|
18
|
-
case third(
|
|
15
|
+
public indirect enum Variant_Bool_String_Double_Date {
|
|
16
|
+
case first(Bool)
|
|
17
|
+
case second(String)
|
|
18
|
+
case third(Double)
|
|
19
19
|
case fourth(Date)
|
|
20
20
|
}
|
|
@@ -159,7 +159,14 @@ public extension WorkoutQueryOptions {
|
|
|
159
159
|
var ascending: Bool? {
|
|
160
160
|
@inline(__always)
|
|
161
161
|
get {
|
|
162
|
-
return
|
|
162
|
+
return { () -> Bool? in
|
|
163
|
+
if bridge.has_value_std__optional_bool_(self.__ascending) {
|
|
164
|
+
let __unwrapped = bridge.get_std__optional_bool_(self.__ascending)
|
|
165
|
+
return __unwrapped
|
|
166
|
+
} else {
|
|
167
|
+
return nil
|
|
168
|
+
}
|
|
169
|
+
}()
|
|
163
170
|
}
|
|
164
171
|
@inline(__always)
|
|
165
172
|
set {
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// AuthDataTypes.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 `SampleTypeIdentifierWriteable` to properly resolve imports.
|
|
27
|
+
namespace margelo::nitro::healthkit { enum class SampleTypeIdentifierWriteable; }
|
|
28
|
+
// Forward declaration of `ObjectTypeIdentifier` to properly resolve imports.
|
|
29
|
+
namespace margelo::nitro::healthkit { enum class ObjectTypeIdentifier; }
|
|
30
|
+
|
|
31
|
+
#include "SampleTypeIdentifierWriteable.hpp"
|
|
32
|
+
#include <vector>
|
|
33
|
+
#include <optional>
|
|
34
|
+
#include "ObjectTypeIdentifier.hpp"
|
|
35
|
+
|
|
36
|
+
namespace margelo::nitro::healthkit {
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* A struct which can be represented as a JavaScript object (AuthDataTypes).
|
|
40
|
+
*/
|
|
41
|
+
struct AuthDataTypes {
|
|
42
|
+
public:
|
|
43
|
+
std::optional<std::vector<SampleTypeIdentifierWriteable>> toShare SWIFT_PRIVATE;
|
|
44
|
+
std::optional<std::vector<ObjectTypeIdentifier>> toRead SWIFT_PRIVATE;
|
|
45
|
+
|
|
46
|
+
public:
|
|
47
|
+
AuthDataTypes() = default;
|
|
48
|
+
explicit AuthDataTypes(std::optional<std::vector<SampleTypeIdentifierWriteable>> toShare, std::optional<std::vector<ObjectTypeIdentifier>> toRead): toShare(toShare), toRead(toRead) {}
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
} // namespace margelo::nitro::healthkit
|
|
52
|
+
|
|
53
|
+
namespace margelo::nitro {
|
|
54
|
+
|
|
55
|
+
// C++ AuthDataTypes <> JS AuthDataTypes (object)
|
|
56
|
+
template <>
|
|
57
|
+
struct JSIConverter<margelo::nitro::healthkit::AuthDataTypes> final {
|
|
58
|
+
static inline margelo::nitro::healthkit::AuthDataTypes fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
59
|
+
jsi::Object obj = arg.asObject(runtime);
|
|
60
|
+
return margelo::nitro::healthkit::AuthDataTypes(
|
|
61
|
+
JSIConverter<std::optional<std::vector<margelo::nitro::healthkit::SampleTypeIdentifierWriteable>>>::fromJSI(runtime, obj.getProperty(runtime, "toShare")),
|
|
62
|
+
JSIConverter<std::optional<std::vector<margelo::nitro::healthkit::ObjectTypeIdentifier>>>::fromJSI(runtime, obj.getProperty(runtime, "toRead"))
|
|
63
|
+
);
|
|
64
|
+
}
|
|
65
|
+
static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::healthkit::AuthDataTypes& arg) {
|
|
66
|
+
jsi::Object obj(runtime);
|
|
67
|
+
obj.setProperty(runtime, "toShare", JSIConverter<std::optional<std::vector<margelo::nitro::healthkit::SampleTypeIdentifierWriteable>>>::toJSI(runtime, arg.toShare));
|
|
68
|
+
obj.setProperty(runtime, "toRead", JSIConverter<std::optional<std::vector<margelo::nitro::healthkit::ObjectTypeIdentifier>>>::toJSI(runtime, arg.toRead));
|
|
69
|
+
return obj;
|
|
70
|
+
}
|
|
71
|
+
static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
|
|
72
|
+
if (!value.isObject()) {
|
|
73
|
+
return false;
|
|
74
|
+
}
|
|
75
|
+
jsi::Object obj = value.getObject(runtime);
|
|
76
|
+
if (!nitro::isPlainObject(runtime, obj)) {
|
|
77
|
+
return false;
|
|
78
|
+
}
|
|
79
|
+
if (!JSIConverter<std::optional<std::vector<margelo::nitro::healthkit::SampleTypeIdentifierWriteable>>>::canConvert(runtime, obj.getProperty(runtime, "toShare"))) return false;
|
|
80
|
+
if (!JSIConverter<std::optional<std::vector<margelo::nitro::healthkit::ObjectTypeIdentifier>>>::canConvert(runtime, obj.getProperty(runtime, "toRead"))) return false;
|
|
81
|
+
return true;
|
|
82
|
+
}
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
} // namespace margelo::nitro
|
|
@@ -27,8 +27,6 @@
|
|
|
27
27
|
namespace margelo::nitro::healthkit { struct Device; }
|
|
28
28
|
// Forward declaration of `CategoryTypeIdentifier` to properly resolve imports.
|
|
29
29
|
namespace margelo::nitro::healthkit { enum class CategoryTypeIdentifier; }
|
|
30
|
-
// Forward declaration of `AnyMap` to properly resolve imports.
|
|
31
|
-
namespace NitroModules { class AnyMap; }
|
|
32
30
|
// Forward declaration of `SourceRevision` to properly resolve imports.
|
|
33
31
|
namespace margelo::nitro::healthkit { struct SourceRevision; }
|
|
34
32
|
|