@kingstinct/react-native-healthkit 9.0.9 → 9.0.11
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 +1 -1
- package/ios/CategoryTypeModule.swift +1 -1
- package/ios/CorrelationTypeModule.swift +1 -1
- package/ios/QuantityTypeModule.swift +5 -5
- package/ios/Serializers.swift +2 -2
- package/ios/StateOfMindModule.swift +2 -2
- package/ios/WorkoutProxy.swift +1 -1
- package/ios/WorkoutsModule.swift +1 -1
- package/nitrogen/generated/ios/ReactNativeHealthkit-Swift-Cxx-Bridge.hpp +84 -84
- package/nitrogen/generated/ios/ReactNativeHealthkit-Swift-Cxx-Umbrella.hpp +1 -1
- package/nitrogen/generated/ios/swift/CategorySample.swift +3 -3
- package/nitrogen/generated/ios/swift/CategorySampleForSaving.swift +3 -3
- package/nitrogen/generated/ios/swift/CorrelationSample.swift +3 -3
- package/nitrogen/generated/ios/swift/DeletedSample.swift +4 -4
- package/nitrogen/generated/ios/swift/HeartbeatSeriesSample.swift +4 -4
- package/nitrogen/generated/ios/swift/HybridCategoryTypeModuleSpec.swift +1 -1
- package/nitrogen/generated/ios/swift/HybridCategoryTypeModuleSpec_cxx.swift +2 -2
- package/nitrogen/generated/ios/swift/HybridCorrelationTypeModuleSpec.swift +1 -1
- package/nitrogen/generated/ios/swift/HybridCorrelationTypeModuleSpec_cxx.swift +2 -2
- package/nitrogen/generated/ios/swift/HybridQuantityTypeModuleSpec.swift +1 -1
- package/nitrogen/generated/ios/swift/HybridQuantityTypeModuleSpec_cxx.swift +2 -2
- package/nitrogen/generated/ios/swift/HybridStateOfMindModuleSpec.swift +1 -1
- package/nitrogen/generated/ios/swift/HybridStateOfMindModuleSpec_cxx.swift +2 -2
- package/nitrogen/generated/ios/swift/HybridWorkoutProxySpec.swift +1 -1
- package/nitrogen/generated/ios/swift/HybridWorkoutsModuleSpec.swift +1 -1
- package/nitrogen/generated/ios/swift/HybridWorkoutsModuleSpec_cxx.swift +2 -2
- package/nitrogen/generated/ios/swift/QuantitySample.swift +3 -3
- package/nitrogen/generated/ios/swift/QuantitySampleForSaving.swift +3 -3
- package/nitrogen/generated/ios/swift/StateOfMindSample.swift +4 -4
- package/nitrogen/generated/ios/swift/WorkoutSample.swift +4 -4
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -184,7 +184,7 @@ See the [contributing guide](CONTRIBUTING.md) to learn how to contribute to the
|
|
|
184
184
|
|
|
185
185
|
If you're using @kingstinct/react-native-healthkit to build your production app [please consider funding its continued development](https://github.com/sponsors/Kingstinct). It helps us spend more time on keeping this library as good as it can be.
|
|
186
186
|
|
|
187
|
-
At Kingstinct we're also able to provide enterprise-grade support for this package, [find us here](https://kingstinct.com) or [drop an email](mailto:healthkit@kingstinct.com) for more information. Also feel free to join our [Discord community](https://discord.gg/
|
|
187
|
+
At Kingstinct we're also able to provide enterprise-grade support for this package, [find us here](https://kingstinct.com) or [drop an email](mailto:healthkit@kingstinct.com) for more information. Also feel free to join our [Discord community](https://discord.gg/hrgnETpsJA).
|
|
188
188
|
|
|
189
189
|
## License
|
|
190
190
|
|
|
@@ -7,7 +7,7 @@ class CorrelationTypeModule: HybridCorrelationTypeModuleSpec {
|
|
|
7
7
|
samples: [SampleForSaving],
|
|
8
8
|
start: Date,
|
|
9
9
|
end: Date,
|
|
10
|
-
metadata:
|
|
10
|
+
metadata: AnyMap
|
|
11
11
|
) throws -> Promise<Bool> {
|
|
12
12
|
let correlationType = try initializeCorrelationType(typeIdentifier.stringValue)
|
|
13
13
|
|
|
@@ -79,7 +79,7 @@ func saveQuantitySampleInternal(
|
|
|
79
79
|
}
|
|
80
80
|
}
|
|
81
81
|
|
|
82
|
-
func getAnyMapValue(_ anyMap:
|
|
82
|
+
func getAnyMapValue(_ anyMap: AnyMap, key: String) -> Any? {
|
|
83
83
|
if anyMap.isBool(key: key) {
|
|
84
84
|
return anyMap.getBoolean(key: key)
|
|
85
85
|
}
|
|
@@ -104,7 +104,7 @@ func getAnyMapValue(_ anyMap: AnyMapHolder, key: String) -> Any? {
|
|
|
104
104
|
return nil
|
|
105
105
|
}
|
|
106
106
|
|
|
107
|
-
func anyMapToDictionary(_ anyMap:
|
|
107
|
+
func anyMapToDictionary(_ anyMap: AnyMap) -> [String: Any] {
|
|
108
108
|
var dict = [String: Any]()
|
|
109
109
|
anyMap.getAllKeys().forEach { key in
|
|
110
110
|
dict[key] = getAnyMapValue(anyMap, key: key)
|
|
@@ -169,9 +169,9 @@ class QuantityTypeModule: HybridQuantityTypeModuleSpec {
|
|
|
169
169
|
|
|
170
170
|
let quantityType = try initializeQuantityType(identifier.stringValue)
|
|
171
171
|
let predicate = try createPredicate(filter: options?.filter)
|
|
172
|
-
let unit = HKUnit.init(from: options?.unit ?? "count")
|
|
173
172
|
|
|
174
173
|
return Promise.async {
|
|
174
|
+
let unit = try await getUnitToUse(unitOverride: options?.unit, quantityType: quantityType)
|
|
175
175
|
return try await withCheckedThrowingContinuation { continuation in
|
|
176
176
|
let query = HKStatisticsQuery.init(
|
|
177
177
|
quantityType: quantityType,
|
|
@@ -254,7 +254,6 @@ class QuantityTypeModule: HybridQuantityTypeModuleSpec {
|
|
|
254
254
|
let quantityType = try initializeQuantityType(identifier.stringValue)
|
|
255
255
|
|
|
256
256
|
let predicate = try createPredicate(filter: options?.filter)
|
|
257
|
-
let unit = HKUnit.init(from: options?.unit ?? "count")
|
|
258
257
|
|
|
259
258
|
// Convert the anchor date string to Date
|
|
260
259
|
let dateFormatter = ISO8601DateFormatter()
|
|
@@ -284,6 +283,7 @@ class QuantityTypeModule: HybridQuantityTypeModuleSpec {
|
|
|
284
283
|
let opts = buildStatisticsOptions(statistics: statistics)
|
|
285
284
|
|
|
286
285
|
return Promise.async {
|
|
286
|
+
let unit = try await getUnitToUse(unitOverride: options?.unit, quantityType: quantityType)
|
|
287
287
|
return try await withCheckedThrowingContinuation { continuation in
|
|
288
288
|
let query = HKStatisticsCollectionQuery.init(
|
|
289
289
|
quantityType: quantityType,
|
|
@@ -453,7 +453,7 @@ class QuantityTypeModule: HybridQuantityTypeModuleSpec {
|
|
|
453
453
|
}
|
|
454
454
|
}
|
|
455
455
|
|
|
456
|
-
func saveQuantitySample(identifier: QuantityTypeIdentifier, unit: String, value: Double, start: Date, end: Date, metadata:
|
|
456
|
+
func saveQuantitySample(identifier: QuantityTypeIdentifier, unit: String, value: Double, start: Date, end: Date, metadata: AnyMap) throws -> Promise<Bool> {
|
|
457
457
|
return saveQuantitySampleInternal(
|
|
458
458
|
typeIdentifier: HKQuantityType(
|
|
459
459
|
HKQuantityTypeIdentifier(rawValue: identifier.stringValue)
|
package/ios/Serializers.swift
CHANGED
|
@@ -207,8 +207,8 @@ func serializeUnknownQuantity(quantity: HKQuantity) -> [String: AnyValue]? {
|
|
|
207
207
|
return nil
|
|
208
208
|
}
|
|
209
209
|
|
|
210
|
-
func serializeMetadata(_ metadata: [String: Any]?) ->
|
|
211
|
-
let serialized =
|
|
210
|
+
func serializeMetadata(_ metadata: [String: Any]?) -> AnyMap {
|
|
211
|
+
let serialized = AnyMap()
|
|
212
212
|
if let m = metadata {
|
|
213
213
|
for item in m {
|
|
214
214
|
if let bool = item.value as? Bool {
|
|
@@ -91,7 +91,7 @@ class StateOfMindModule: HybridStateOfMindModuleSpec {
|
|
|
91
91
|
valence: Double,
|
|
92
92
|
labels: [StateOfMindLabel],
|
|
93
93
|
associations: [StateOfMindAssociation],
|
|
94
|
-
metadata:
|
|
94
|
+
metadata: AnyMap?
|
|
95
95
|
) throws -> Promise<Bool> {
|
|
96
96
|
if #available(iOS 18, *) {
|
|
97
97
|
return Promise.async {
|
|
@@ -119,7 +119,7 @@ class StateOfMindModule: HybridStateOfMindModuleSpec {
|
|
|
119
119
|
valence: valence,
|
|
120
120
|
labels: hkLabels,
|
|
121
121
|
associations: hkAssociations,
|
|
122
|
-
metadata: anyMapToDictionary(metadata ??
|
|
122
|
+
metadata: anyMapToDictionary(metadata ?? AnyMap())
|
|
123
123
|
)
|
|
124
124
|
|
|
125
125
|
store.save(sample) { (success: Bool, error: Error?) in
|
package/ios/WorkoutProxy.swift
CHANGED
package/ios/WorkoutsModule.swift
CHANGED
|
@@ -101,7 +101,7 @@ class WorkoutsModule: HybridWorkoutsModuleSpec {
|
|
|
101
101
|
startDate: Date,
|
|
102
102
|
endDate: Date,
|
|
103
103
|
totals: WorkoutTotals,
|
|
104
|
-
metadata:
|
|
104
|
+
metadata: AnyMap
|
|
105
105
|
) throws -> Promise<String> {
|
|
106
106
|
|
|
107
107
|
let type = try initializeWorkoutActivityType(UInt(workoutActivityType.rawValue))
|
|
@@ -295,13 +295,13 @@ namespace margelo::nitro::healthkit::bridge::swift {
|
|
|
295
295
|
*/
|
|
296
296
|
class Func_void_bool_Wrapper final {
|
|
297
297
|
public:
|
|
298
|
-
explicit Func_void_bool_Wrapper(std::function<void(bool /* result */)>&& func): _function(std::
|
|
298
|
+
explicit Func_void_bool_Wrapper(std::function<void(bool /* result */)>&& func): _function(std::make_unique<std::function<void(bool /* result */)>>(std::move(func))) {}
|
|
299
299
|
inline void call(bool result) const {
|
|
300
300
|
_function->operator()(result);
|
|
301
301
|
}
|
|
302
302
|
private:
|
|
303
|
-
std::
|
|
304
|
-
};
|
|
303
|
+
std::unique_ptr<std::function<void(bool /* result */)>> _function;
|
|
304
|
+
} SWIFT_NONCOPYABLE;
|
|
305
305
|
Func_void_bool create_Func_void_bool(void* _Nonnull swiftClosureWrapper);
|
|
306
306
|
inline Func_void_bool_Wrapper wrap_Func_void_bool(Func_void_bool value) {
|
|
307
307
|
return Func_void_bool_Wrapper(std::move(value));
|
|
@@ -317,13 +317,13 @@ namespace margelo::nitro::healthkit::bridge::swift {
|
|
|
317
317
|
*/
|
|
318
318
|
class Func_void_std__exception_ptr_Wrapper final {
|
|
319
319
|
public:
|
|
320
|
-
explicit Func_void_std__exception_ptr_Wrapper(std::function<void(const std::exception_ptr& /* error */)>&& func): _function(std::
|
|
320
|
+
explicit Func_void_std__exception_ptr_Wrapper(std::function<void(const std::exception_ptr& /* error */)>&& func): _function(std::make_unique<std::function<void(const std::exception_ptr& /* error */)>>(std::move(func))) {}
|
|
321
321
|
inline void call(std::exception_ptr error) const {
|
|
322
322
|
_function->operator()(error);
|
|
323
323
|
}
|
|
324
324
|
private:
|
|
325
|
-
std::
|
|
326
|
-
};
|
|
325
|
+
std::unique_ptr<std::function<void(const std::exception_ptr& /* error */)>> _function;
|
|
326
|
+
} SWIFT_NONCOPYABLE;
|
|
327
327
|
Func_void_std__exception_ptr create_Func_void_std__exception_ptr(void* _Nonnull swiftClosureWrapper);
|
|
328
328
|
inline Func_void_std__exception_ptr_Wrapper wrap_Func_void_std__exception_ptr(Func_void_std__exception_ptr value) {
|
|
329
329
|
return Func_void_std__exception_ptr_Wrapper(std::move(value));
|
|
@@ -410,13 +410,13 @@ namespace margelo::nitro::healthkit::bridge::swift {
|
|
|
410
410
|
*/
|
|
411
411
|
class Func_void_std__vector_CategorySample__Wrapper final {
|
|
412
412
|
public:
|
|
413
|
-
explicit Func_void_std__vector_CategorySample__Wrapper(std::function<void(const std::vector<CategorySample>& /* result */)>&& func): _function(std::
|
|
413
|
+
explicit Func_void_std__vector_CategorySample__Wrapper(std::function<void(const std::vector<CategorySample>& /* result */)>&& func): _function(std::make_unique<std::function<void(const std::vector<CategorySample>& /* result */)>>(std::move(func))) {}
|
|
414
414
|
inline void call(std::vector<CategorySample> result) const {
|
|
415
415
|
_function->operator()(result);
|
|
416
416
|
}
|
|
417
417
|
private:
|
|
418
|
-
std::
|
|
419
|
-
};
|
|
418
|
+
std::unique_ptr<std::function<void(const std::vector<CategorySample>& /* result */)>> _function;
|
|
419
|
+
} SWIFT_NONCOPYABLE;
|
|
420
420
|
Func_void_std__vector_CategorySample_ create_Func_void_std__vector_CategorySample_(void* _Nonnull swiftClosureWrapper);
|
|
421
421
|
inline Func_void_std__vector_CategorySample__Wrapper wrap_Func_void_std__vector_CategorySample_(Func_void_std__vector_CategorySample_ value) {
|
|
422
422
|
return Func_void_std__vector_CategorySample__Wrapper(std::move(value));
|
|
@@ -649,13 +649,13 @@ namespace margelo::nitro::healthkit::bridge::swift {
|
|
|
649
649
|
*/
|
|
650
650
|
class Func_void_CategorySamplesWithAnchorResponse_Wrapper final {
|
|
651
651
|
public:
|
|
652
|
-
explicit Func_void_CategorySamplesWithAnchorResponse_Wrapper(std::function<void(const CategorySamplesWithAnchorResponse& /* result */)>&& func): _function(std::
|
|
652
|
+
explicit Func_void_CategorySamplesWithAnchorResponse_Wrapper(std::function<void(const CategorySamplesWithAnchorResponse& /* result */)>&& func): _function(std::make_unique<std::function<void(const CategorySamplesWithAnchorResponse& /* result */)>>(std::move(func))) {}
|
|
653
653
|
inline void call(CategorySamplesWithAnchorResponse result) const {
|
|
654
654
|
_function->operator()(result);
|
|
655
655
|
}
|
|
656
656
|
private:
|
|
657
|
-
std::
|
|
658
|
-
};
|
|
657
|
+
std::unique_ptr<std::function<void(const CategorySamplesWithAnchorResponse& /* result */)>> _function;
|
|
658
|
+
} SWIFT_NONCOPYABLE;
|
|
659
659
|
Func_void_CategorySamplesWithAnchorResponse create_Func_void_CategorySamplesWithAnchorResponse(void* _Nonnull swiftClosureWrapper);
|
|
660
660
|
inline Func_void_CategorySamplesWithAnchorResponse_Wrapper wrap_Func_void_CategorySamplesWithAnchorResponse(Func_void_CategorySamplesWithAnchorResponse value) {
|
|
661
661
|
return Func_void_CategorySamplesWithAnchorResponse_Wrapper(std::move(value));
|
|
@@ -722,13 +722,13 @@ namespace margelo::nitro::healthkit::bridge::swift {
|
|
|
722
722
|
*/
|
|
723
723
|
class Func_void_BloodType_Wrapper final {
|
|
724
724
|
public:
|
|
725
|
-
explicit Func_void_BloodType_Wrapper(std::function<void(BloodType /* result */)>&& func): _function(std::
|
|
725
|
+
explicit Func_void_BloodType_Wrapper(std::function<void(BloodType /* result */)>&& func): _function(std::make_unique<std::function<void(BloodType /* result */)>>(std::move(func))) {}
|
|
726
726
|
inline void call(int result) const {
|
|
727
727
|
_function->operator()(static_cast<BloodType>(result));
|
|
728
728
|
}
|
|
729
729
|
private:
|
|
730
|
-
std::
|
|
731
|
-
};
|
|
730
|
+
std::unique_ptr<std::function<void(BloodType /* result */)>> _function;
|
|
731
|
+
} SWIFT_NONCOPYABLE;
|
|
732
732
|
Func_void_BloodType create_Func_void_BloodType(void* _Nonnull swiftClosureWrapper);
|
|
733
733
|
inline Func_void_BloodType_Wrapper wrap_Func_void_BloodType(Func_void_BloodType value) {
|
|
734
734
|
return Func_void_BloodType_Wrapper(std::move(value));
|
|
@@ -756,13 +756,13 @@ namespace margelo::nitro::healthkit::bridge::swift {
|
|
|
756
756
|
*/
|
|
757
757
|
class Func_void_std__optional_std__chrono__system_clock__time_point__Wrapper final {
|
|
758
758
|
public:
|
|
759
|
-
explicit Func_void_std__optional_std__chrono__system_clock__time_point__Wrapper(std::function<void(std::optional<std::chrono::system_clock::time_point> /* result */)>&& func): _function(std::
|
|
759
|
+
explicit Func_void_std__optional_std__chrono__system_clock__time_point__Wrapper(std::function<void(std::optional<std::chrono::system_clock::time_point> /* result */)>&& func): _function(std::make_unique<std::function<void(std::optional<std::chrono::system_clock::time_point> /* result */)>>(std::move(func))) {}
|
|
760
760
|
inline void call(std::optional<std::chrono::system_clock::time_point> result) const {
|
|
761
761
|
_function->operator()(result);
|
|
762
762
|
}
|
|
763
763
|
private:
|
|
764
|
-
std::
|
|
765
|
-
};
|
|
764
|
+
std::unique_ptr<std::function<void(std::optional<std::chrono::system_clock::time_point> /* result */)>> _function;
|
|
765
|
+
} SWIFT_NONCOPYABLE;
|
|
766
766
|
Func_void_std__optional_std__chrono__system_clock__time_point_ create_Func_void_std__optional_std__chrono__system_clock__time_point_(void* _Nonnull swiftClosureWrapper);
|
|
767
767
|
inline Func_void_std__optional_std__chrono__system_clock__time_point__Wrapper wrap_Func_void_std__optional_std__chrono__system_clock__time_point_(Func_void_std__optional_std__chrono__system_clock__time_point_ value) {
|
|
768
768
|
return Func_void_std__optional_std__chrono__system_clock__time_point__Wrapper(std::move(value));
|
|
@@ -790,13 +790,13 @@ namespace margelo::nitro::healthkit::bridge::swift {
|
|
|
790
790
|
*/
|
|
791
791
|
class Func_void_BiologicalSex_Wrapper final {
|
|
792
792
|
public:
|
|
793
|
-
explicit Func_void_BiologicalSex_Wrapper(std::function<void(BiologicalSex /* result */)>&& func): _function(std::
|
|
793
|
+
explicit Func_void_BiologicalSex_Wrapper(std::function<void(BiologicalSex /* result */)>&& func): _function(std::make_unique<std::function<void(BiologicalSex /* result */)>>(std::move(func))) {}
|
|
794
794
|
inline void call(int result) const {
|
|
795
795
|
_function->operator()(static_cast<BiologicalSex>(result));
|
|
796
796
|
}
|
|
797
797
|
private:
|
|
798
|
-
std::
|
|
799
|
-
};
|
|
798
|
+
std::unique_ptr<std::function<void(BiologicalSex /* result */)>> _function;
|
|
799
|
+
} SWIFT_NONCOPYABLE;
|
|
800
800
|
Func_void_BiologicalSex create_Func_void_BiologicalSex(void* _Nonnull swiftClosureWrapper);
|
|
801
801
|
inline Func_void_BiologicalSex_Wrapper wrap_Func_void_BiologicalSex(Func_void_BiologicalSex value) {
|
|
802
802
|
return Func_void_BiologicalSex_Wrapper(std::move(value));
|
|
@@ -824,13 +824,13 @@ namespace margelo::nitro::healthkit::bridge::swift {
|
|
|
824
824
|
*/
|
|
825
825
|
class Func_void_FitzpatrickSkinType_Wrapper final {
|
|
826
826
|
public:
|
|
827
|
-
explicit Func_void_FitzpatrickSkinType_Wrapper(std::function<void(FitzpatrickSkinType /* result */)>&& func): _function(std::
|
|
827
|
+
explicit Func_void_FitzpatrickSkinType_Wrapper(std::function<void(FitzpatrickSkinType /* result */)>&& func): _function(std::make_unique<std::function<void(FitzpatrickSkinType /* result */)>>(std::move(func))) {}
|
|
828
828
|
inline void call(int result) const {
|
|
829
829
|
_function->operator()(static_cast<FitzpatrickSkinType>(result));
|
|
830
830
|
}
|
|
831
831
|
private:
|
|
832
|
-
std::
|
|
833
|
-
};
|
|
832
|
+
std::unique_ptr<std::function<void(FitzpatrickSkinType /* result */)>> _function;
|
|
833
|
+
} SWIFT_NONCOPYABLE;
|
|
834
834
|
Func_void_FitzpatrickSkinType create_Func_void_FitzpatrickSkinType(void* _Nonnull swiftClosureWrapper);
|
|
835
835
|
inline Func_void_FitzpatrickSkinType_Wrapper wrap_Func_void_FitzpatrickSkinType(Func_void_FitzpatrickSkinType value) {
|
|
836
836
|
return Func_void_FitzpatrickSkinType_Wrapper(std::move(value));
|
|
@@ -858,13 +858,13 @@ namespace margelo::nitro::healthkit::bridge::swift {
|
|
|
858
858
|
*/
|
|
859
859
|
class Func_void_WheelchairUse_Wrapper final {
|
|
860
860
|
public:
|
|
861
|
-
explicit Func_void_WheelchairUse_Wrapper(std::function<void(WheelchairUse /* result */)>&& func): _function(std::
|
|
861
|
+
explicit Func_void_WheelchairUse_Wrapper(std::function<void(WheelchairUse /* result */)>&& func): _function(std::make_unique<std::function<void(WheelchairUse /* result */)>>(std::move(func))) {}
|
|
862
862
|
inline void call(int result) const {
|
|
863
863
|
_function->operator()(static_cast<WheelchairUse>(result));
|
|
864
864
|
}
|
|
865
865
|
private:
|
|
866
|
-
std::
|
|
867
|
-
};
|
|
866
|
+
std::unique_ptr<std::function<void(WheelchairUse /* result */)>> _function;
|
|
867
|
+
} SWIFT_NONCOPYABLE;
|
|
868
868
|
Func_void_WheelchairUse create_Func_void_WheelchairUse(void* _Nonnull swiftClosureWrapper);
|
|
869
869
|
inline Func_void_WheelchairUse_Wrapper wrap_Func_void_WheelchairUse(Func_void_WheelchairUse value) {
|
|
870
870
|
return Func_void_WheelchairUse_Wrapper(std::move(value));
|
|
@@ -1005,13 +1005,13 @@ namespace margelo::nitro::healthkit::bridge::swift {
|
|
|
1005
1005
|
*/
|
|
1006
1006
|
class Func_void_std__vector_IdentifierWithUnit__Wrapper final {
|
|
1007
1007
|
public:
|
|
1008
|
-
explicit Func_void_std__vector_IdentifierWithUnit__Wrapper(std::function<void(const std::vector<IdentifierWithUnit>& /* result */)>&& func): _function(std::
|
|
1008
|
+
explicit Func_void_std__vector_IdentifierWithUnit__Wrapper(std::function<void(const std::vector<IdentifierWithUnit>& /* result */)>&& func): _function(std::make_unique<std::function<void(const std::vector<IdentifierWithUnit>& /* result */)>>(std::move(func))) {}
|
|
1009
1009
|
inline void call(std::vector<IdentifierWithUnit> result) const {
|
|
1010
1010
|
_function->operator()(result);
|
|
1011
1011
|
}
|
|
1012
1012
|
private:
|
|
1013
|
-
std::
|
|
1014
|
-
};
|
|
1013
|
+
std::unique_ptr<std::function<void(const std::vector<IdentifierWithUnit>& /* result */)>> _function;
|
|
1014
|
+
} SWIFT_NONCOPYABLE;
|
|
1015
1015
|
Func_void_std__vector_IdentifierWithUnit_ create_Func_void_std__vector_IdentifierWithUnit_(void* _Nonnull swiftClosureWrapper);
|
|
1016
1016
|
inline Func_void_std__vector_IdentifierWithUnit__Wrapper wrap_Func_void_std__vector_IdentifierWithUnit_(Func_void_std__vector_IdentifierWithUnit_ value) {
|
|
1017
1017
|
return Func_void_std__vector_IdentifierWithUnit__Wrapper(std::move(value));
|
|
@@ -1061,13 +1061,13 @@ namespace margelo::nitro::healthkit::bridge::swift {
|
|
|
1061
1061
|
*/
|
|
1062
1062
|
class Func_void_std__vector_std__shared_ptr_margelo__nitro__healthkit__HybridSourceProxySpec___Wrapper final {
|
|
1063
1063
|
public:
|
|
1064
|
-
explicit Func_void_std__vector_std__shared_ptr_margelo__nitro__healthkit__HybridSourceProxySpec___Wrapper(std::function<void(const std::vector<std::shared_ptr<margelo::nitro::healthkit::HybridSourceProxySpec>>& /* result */)>&& func): _function(std::
|
|
1064
|
+
explicit Func_void_std__vector_std__shared_ptr_margelo__nitro__healthkit__HybridSourceProxySpec___Wrapper(std::function<void(const std::vector<std::shared_ptr<margelo::nitro::healthkit::HybridSourceProxySpec>>& /* result */)>&& func): _function(std::make_unique<std::function<void(const std::vector<std::shared_ptr<margelo::nitro::healthkit::HybridSourceProxySpec>>& /* result */)>>(std::move(func))) {}
|
|
1065
1065
|
inline void call(std::vector<std::shared_ptr<margelo::nitro::healthkit::HybridSourceProxySpec>> result) const {
|
|
1066
1066
|
_function->operator()(result);
|
|
1067
1067
|
}
|
|
1068
1068
|
private:
|
|
1069
|
-
std::
|
|
1070
|
-
};
|
|
1069
|
+
std::unique_ptr<std::function<void(const std::vector<std::shared_ptr<margelo::nitro::healthkit::HybridSourceProxySpec>>& /* result */)>> _function;
|
|
1070
|
+
} SWIFT_NONCOPYABLE;
|
|
1071
1071
|
Func_void_std__vector_std__shared_ptr_margelo__nitro__healthkit__HybridSourceProxySpec__ create_Func_void_std__vector_std__shared_ptr_margelo__nitro__healthkit__HybridSourceProxySpec__(void* _Nonnull swiftClosureWrapper);
|
|
1072
1072
|
inline Func_void_std__vector_std__shared_ptr_margelo__nitro__healthkit__HybridSourceProxySpec___Wrapper wrap_Func_void_std__vector_std__shared_ptr_margelo__nitro__healthkit__HybridSourceProxySpec__(Func_void_std__vector_std__shared_ptr_margelo__nitro__healthkit__HybridSourceProxySpec__ value) {
|
|
1073
1073
|
return Func_void_std__vector_std__shared_ptr_margelo__nitro__healthkit__HybridSourceProxySpec___Wrapper(std::move(value));
|
|
@@ -1083,13 +1083,13 @@ namespace margelo::nitro::healthkit::bridge::swift {
|
|
|
1083
1083
|
*/
|
|
1084
1084
|
class Func_void_OnChangeCallbackArgs_Wrapper final {
|
|
1085
1085
|
public:
|
|
1086
|
-
explicit Func_void_OnChangeCallbackArgs_Wrapper(std::function<void(const OnChangeCallbackArgs& /* args */)>&& func): _function(std::
|
|
1086
|
+
explicit Func_void_OnChangeCallbackArgs_Wrapper(std::function<void(const OnChangeCallbackArgs& /* args */)>&& func): _function(std::make_unique<std::function<void(const OnChangeCallbackArgs& /* args */)>>(std::move(func))) {}
|
|
1087
1087
|
inline void call(OnChangeCallbackArgs args) const {
|
|
1088
1088
|
_function->operator()(args);
|
|
1089
1089
|
}
|
|
1090
1090
|
private:
|
|
1091
|
-
std::
|
|
1092
|
-
};
|
|
1091
|
+
std::unique_ptr<std::function<void(const OnChangeCallbackArgs& /* args */)>> _function;
|
|
1092
|
+
} SWIFT_NONCOPYABLE;
|
|
1093
1093
|
Func_void_OnChangeCallbackArgs create_Func_void_OnChangeCallbackArgs(void* _Nonnull swiftClosureWrapper);
|
|
1094
1094
|
inline Func_void_OnChangeCallbackArgs_Wrapper wrap_Func_void_OnChangeCallbackArgs(Func_void_OnChangeCallbackArgs value) {
|
|
1095
1095
|
return Func_void_OnChangeCallbackArgs_Wrapper(std::move(value));
|
|
@@ -1117,13 +1117,13 @@ namespace margelo::nitro::healthkit::bridge::swift {
|
|
|
1117
1117
|
*/
|
|
1118
1118
|
class Func_void_double_Wrapper final {
|
|
1119
1119
|
public:
|
|
1120
|
-
explicit Func_void_double_Wrapper(std::function<void(double /* result */)>&& func): _function(std::
|
|
1120
|
+
explicit Func_void_double_Wrapper(std::function<void(double /* result */)>&& func): _function(std::make_unique<std::function<void(double /* result */)>>(std::move(func))) {}
|
|
1121
1121
|
inline void call(double result) const {
|
|
1122
1122
|
_function->operator()(result);
|
|
1123
1123
|
}
|
|
1124
1124
|
private:
|
|
1125
|
-
std::
|
|
1126
|
-
};
|
|
1125
|
+
std::unique_ptr<std::function<void(double /* result */)>> _function;
|
|
1126
|
+
} SWIFT_NONCOPYABLE;
|
|
1127
1127
|
Func_void_double create_Func_void_double(void* _Nonnull swiftClosureWrapper);
|
|
1128
1128
|
inline Func_void_double_Wrapper wrap_Func_void_double(Func_void_double value) {
|
|
1129
1129
|
return Func_void_double_Wrapper(std::move(value));
|
|
@@ -1151,13 +1151,13 @@ namespace margelo::nitro::healthkit::bridge::swift {
|
|
|
1151
1151
|
*/
|
|
1152
1152
|
class Func_void_AuthorizationRequestStatus_Wrapper final {
|
|
1153
1153
|
public:
|
|
1154
|
-
explicit Func_void_AuthorizationRequestStatus_Wrapper(std::function<void(AuthorizationRequestStatus /* result */)>&& func): _function(std::
|
|
1154
|
+
explicit Func_void_AuthorizationRequestStatus_Wrapper(std::function<void(AuthorizationRequestStatus /* result */)>&& func): _function(std::make_unique<std::function<void(AuthorizationRequestStatus /* result */)>>(std::move(func))) {}
|
|
1155
1155
|
inline void call(int result) const {
|
|
1156
1156
|
_function->operator()(static_cast<AuthorizationRequestStatus>(result));
|
|
1157
1157
|
}
|
|
1158
1158
|
private:
|
|
1159
|
-
std::
|
|
1160
|
-
};
|
|
1159
|
+
std::unique_ptr<std::function<void(AuthorizationRequestStatus /* result */)>> _function;
|
|
1160
|
+
} SWIFT_NONCOPYABLE;
|
|
1161
1161
|
Func_void_AuthorizationRequestStatus create_Func_void_AuthorizationRequestStatus(void* _Nonnull swiftClosureWrapper);
|
|
1162
1162
|
inline Func_void_AuthorizationRequestStatus_Wrapper wrap_Func_void_AuthorizationRequestStatus(Func_void_AuthorizationRequestStatus value) {
|
|
1163
1163
|
return Func_void_AuthorizationRequestStatus_Wrapper(std::move(value));
|
|
@@ -1229,13 +1229,13 @@ namespace margelo::nitro::healthkit::bridge::swift {
|
|
|
1229
1229
|
*/
|
|
1230
1230
|
class Func_void_std__unordered_map_std__string__bool__Wrapper final {
|
|
1231
1231
|
public:
|
|
1232
|
-
explicit Func_void_std__unordered_map_std__string__bool__Wrapper(std::function<void(const std::unordered_map<std::string, bool>& /* result */)>&& func): _function(std::
|
|
1232
|
+
explicit Func_void_std__unordered_map_std__string__bool__Wrapper(std::function<void(const std::unordered_map<std::string, bool>& /* result */)>&& func): _function(std::make_unique<std::function<void(const std::unordered_map<std::string, bool>& /* result */)>>(std::move(func))) {}
|
|
1233
1233
|
inline void call(std::unordered_map<std::string, bool> result) const {
|
|
1234
1234
|
_function->operator()(result);
|
|
1235
1235
|
}
|
|
1236
1236
|
private:
|
|
1237
|
-
std::
|
|
1238
|
-
};
|
|
1237
|
+
std::unique_ptr<std::function<void(const std::unordered_map<std::string, bool>& /* result */)>> _function;
|
|
1238
|
+
} SWIFT_NONCOPYABLE;
|
|
1239
1239
|
Func_void_std__unordered_map_std__string__bool_ create_Func_void_std__unordered_map_std__string__bool_(void* _Nonnull swiftClosureWrapper);
|
|
1240
1240
|
inline Func_void_std__unordered_map_std__string__bool__Wrapper wrap_Func_void_std__unordered_map_std__string__bool_(Func_void_std__unordered_map_std__string__bool_ value) {
|
|
1241
1241
|
return Func_void_std__unordered_map_std__string__bool__Wrapper(std::move(value));
|
|
@@ -1456,13 +1456,13 @@ namespace margelo::nitro::healthkit::bridge::swift {
|
|
|
1456
1456
|
*/
|
|
1457
1457
|
class Func_void_std__vector_CorrelationSample__Wrapper final {
|
|
1458
1458
|
public:
|
|
1459
|
-
explicit Func_void_std__vector_CorrelationSample__Wrapper(std::function<void(const std::vector<CorrelationSample>& /* result */)>&& func): _function(std::
|
|
1459
|
+
explicit Func_void_std__vector_CorrelationSample__Wrapper(std::function<void(const std::vector<CorrelationSample>& /* result */)>&& func): _function(std::make_unique<std::function<void(const std::vector<CorrelationSample>& /* result */)>>(std::move(func))) {}
|
|
1460
1460
|
inline void call(std::vector<CorrelationSample> result) const {
|
|
1461
1461
|
_function->operator()(result);
|
|
1462
1462
|
}
|
|
1463
1463
|
private:
|
|
1464
|
-
std::
|
|
1465
|
-
};
|
|
1464
|
+
std::unique_ptr<std::function<void(const std::vector<CorrelationSample>& /* result */)>> _function;
|
|
1465
|
+
} SWIFT_NONCOPYABLE;
|
|
1466
1466
|
Func_void_std__vector_CorrelationSample_ create_Func_void_std__vector_CorrelationSample_(void* _Nonnull swiftClosureWrapper);
|
|
1467
1467
|
inline Func_void_std__vector_CorrelationSample__Wrapper wrap_Func_void_std__vector_CorrelationSample_(Func_void_std__vector_CorrelationSample_ value) {
|
|
1468
1468
|
return Func_void_std__vector_CorrelationSample__Wrapper(std::move(value));
|
|
@@ -1533,13 +1533,13 @@ namespace margelo::nitro::healthkit::bridge::swift {
|
|
|
1533
1533
|
*/
|
|
1534
1534
|
class Func_void_std__vector_HeartbeatSeriesSample__Wrapper final {
|
|
1535
1535
|
public:
|
|
1536
|
-
explicit Func_void_std__vector_HeartbeatSeriesSample__Wrapper(std::function<void(const std::vector<HeartbeatSeriesSample>& /* result */)>&& func): _function(std::
|
|
1536
|
+
explicit Func_void_std__vector_HeartbeatSeriesSample__Wrapper(std::function<void(const std::vector<HeartbeatSeriesSample>& /* result */)>&& func): _function(std::make_unique<std::function<void(const std::vector<HeartbeatSeriesSample>& /* result */)>>(std::move(func))) {}
|
|
1537
1537
|
inline void call(std::vector<HeartbeatSeriesSample> result) const {
|
|
1538
1538
|
_function->operator()(result);
|
|
1539
1539
|
}
|
|
1540
1540
|
private:
|
|
1541
|
-
std::
|
|
1542
|
-
};
|
|
1541
|
+
std::unique_ptr<std::function<void(const std::vector<HeartbeatSeriesSample>& /* result */)>> _function;
|
|
1542
|
+
} SWIFT_NONCOPYABLE;
|
|
1543
1543
|
Func_void_std__vector_HeartbeatSeriesSample_ create_Func_void_std__vector_HeartbeatSeriesSample_(void* _Nonnull swiftClosureWrapper);
|
|
1544
1544
|
inline Func_void_std__vector_HeartbeatSeriesSample__Wrapper wrap_Func_void_std__vector_HeartbeatSeriesSample_(Func_void_std__vector_HeartbeatSeriesSample_ value) {
|
|
1545
1545
|
return Func_void_std__vector_HeartbeatSeriesSample__Wrapper(std::move(value));
|
|
@@ -1567,13 +1567,13 @@ namespace margelo::nitro::healthkit::bridge::swift {
|
|
|
1567
1567
|
*/
|
|
1568
1568
|
class Func_void_HeartbeatSeriesSamplesWithAnchorResponse_Wrapper final {
|
|
1569
1569
|
public:
|
|
1570
|
-
explicit Func_void_HeartbeatSeriesSamplesWithAnchorResponse_Wrapper(std::function<void(const HeartbeatSeriesSamplesWithAnchorResponse& /* result */)>&& func): _function(std::
|
|
1570
|
+
explicit Func_void_HeartbeatSeriesSamplesWithAnchorResponse_Wrapper(std::function<void(const HeartbeatSeriesSamplesWithAnchorResponse& /* result */)>&& func): _function(std::make_unique<std::function<void(const HeartbeatSeriesSamplesWithAnchorResponse& /* result */)>>(std::move(func))) {}
|
|
1571
1571
|
inline void call(HeartbeatSeriesSamplesWithAnchorResponse result) const {
|
|
1572
1572
|
_function->operator()(result);
|
|
1573
1573
|
}
|
|
1574
1574
|
private:
|
|
1575
|
-
std::
|
|
1576
|
-
};
|
|
1575
|
+
std::unique_ptr<std::function<void(const HeartbeatSeriesSamplesWithAnchorResponse& /* result */)>> _function;
|
|
1576
|
+
} SWIFT_NONCOPYABLE;
|
|
1577
1577
|
Func_void_HeartbeatSeriesSamplesWithAnchorResponse create_Func_void_HeartbeatSeriesSamplesWithAnchorResponse(void* _Nonnull swiftClosureWrapper);
|
|
1578
1578
|
inline Func_void_HeartbeatSeriesSamplesWithAnchorResponse_Wrapper wrap_Func_void_HeartbeatSeriesSamplesWithAnchorResponse(Func_void_HeartbeatSeriesSamplesWithAnchorResponse value) {
|
|
1579
1579
|
return Func_void_HeartbeatSeriesSamplesWithAnchorResponse_Wrapper(std::move(value));
|
|
@@ -1642,13 +1642,13 @@ namespace margelo::nitro::healthkit::bridge::swift {
|
|
|
1642
1642
|
*/
|
|
1643
1643
|
class Func_void_std__vector_QuantitySample__Wrapper final {
|
|
1644
1644
|
public:
|
|
1645
|
-
explicit Func_void_std__vector_QuantitySample__Wrapper(std::function<void(const std::vector<QuantitySample>& /* result */)>&& func): _function(std::
|
|
1645
|
+
explicit Func_void_std__vector_QuantitySample__Wrapper(std::function<void(const std::vector<QuantitySample>& /* result */)>&& func): _function(std::make_unique<std::function<void(const std::vector<QuantitySample>& /* result */)>>(std::move(func))) {}
|
|
1646
1646
|
inline void call(std::vector<QuantitySample> result) const {
|
|
1647
1647
|
_function->operator()(result);
|
|
1648
1648
|
}
|
|
1649
1649
|
private:
|
|
1650
|
-
std::
|
|
1651
|
-
};
|
|
1650
|
+
std::unique_ptr<std::function<void(const std::vector<QuantitySample>& /* result */)>> _function;
|
|
1651
|
+
} SWIFT_NONCOPYABLE;
|
|
1652
1652
|
Func_void_std__vector_QuantitySample_ create_Func_void_std__vector_QuantitySample_(void* _Nonnull swiftClosureWrapper);
|
|
1653
1653
|
inline Func_void_std__vector_QuantitySample__Wrapper wrap_Func_void_std__vector_QuantitySample_(Func_void_std__vector_QuantitySample_ value) {
|
|
1654
1654
|
return Func_void_std__vector_QuantitySample__Wrapper(std::move(value));
|
|
@@ -1703,13 +1703,13 @@ namespace margelo::nitro::healthkit::bridge::swift {
|
|
|
1703
1703
|
*/
|
|
1704
1704
|
class Func_void_QueryStatisticsResponse_Wrapper final {
|
|
1705
1705
|
public:
|
|
1706
|
-
explicit Func_void_QueryStatisticsResponse_Wrapper(std::function<void(const QueryStatisticsResponse& /* result */)>&& func): _function(std::
|
|
1706
|
+
explicit Func_void_QueryStatisticsResponse_Wrapper(std::function<void(const QueryStatisticsResponse& /* result */)>&& func): _function(std::make_unique<std::function<void(const QueryStatisticsResponse& /* result */)>>(std::move(func))) {}
|
|
1707
1707
|
inline void call(QueryStatisticsResponse result) const {
|
|
1708
1708
|
_function->operator()(result);
|
|
1709
1709
|
}
|
|
1710
1710
|
private:
|
|
1711
|
-
std::
|
|
1712
|
-
};
|
|
1711
|
+
std::unique_ptr<std::function<void(const QueryStatisticsResponse& /* result */)>> _function;
|
|
1712
|
+
} SWIFT_NONCOPYABLE;
|
|
1713
1713
|
Func_void_QueryStatisticsResponse create_Func_void_QueryStatisticsResponse(void* _Nonnull swiftClosureWrapper);
|
|
1714
1714
|
inline Func_void_QueryStatisticsResponse_Wrapper wrap_Func_void_QueryStatisticsResponse(Func_void_QueryStatisticsResponse value) {
|
|
1715
1715
|
return Func_void_QueryStatisticsResponse_Wrapper(std::move(value));
|
|
@@ -1768,13 +1768,13 @@ namespace margelo::nitro::healthkit::bridge::swift {
|
|
|
1768
1768
|
*/
|
|
1769
1769
|
class Func_void_std__vector_QueryStatisticsResponse__Wrapper final {
|
|
1770
1770
|
public:
|
|
1771
|
-
explicit Func_void_std__vector_QueryStatisticsResponse__Wrapper(std::function<void(const std::vector<QueryStatisticsResponse>& /* result */)>&& func): _function(std::
|
|
1771
|
+
explicit Func_void_std__vector_QueryStatisticsResponse__Wrapper(std::function<void(const std::vector<QueryStatisticsResponse>& /* result */)>&& func): _function(std::make_unique<std::function<void(const std::vector<QueryStatisticsResponse>& /* result */)>>(std::move(func))) {}
|
|
1772
1772
|
inline void call(std::vector<QueryStatisticsResponse> result) const {
|
|
1773
1773
|
_function->operator()(result);
|
|
1774
1774
|
}
|
|
1775
1775
|
private:
|
|
1776
|
-
std::
|
|
1777
|
-
};
|
|
1776
|
+
std::unique_ptr<std::function<void(const std::vector<QueryStatisticsResponse>& /* result */)>> _function;
|
|
1777
|
+
} SWIFT_NONCOPYABLE;
|
|
1778
1778
|
Func_void_std__vector_QueryStatisticsResponse_ create_Func_void_std__vector_QueryStatisticsResponse_(void* _Nonnull swiftClosureWrapper);
|
|
1779
1779
|
inline Func_void_std__vector_QueryStatisticsResponse__Wrapper wrap_Func_void_std__vector_QueryStatisticsResponse_(Func_void_std__vector_QueryStatisticsResponse_ value) {
|
|
1780
1780
|
return Func_void_std__vector_QueryStatisticsResponse__Wrapper(std::move(value));
|
|
@@ -1802,13 +1802,13 @@ namespace margelo::nitro::healthkit::bridge::swift {
|
|
|
1802
1802
|
*/
|
|
1803
1803
|
class Func_void_QuantitySamplesWithAnchorResponse_Wrapper final {
|
|
1804
1804
|
public:
|
|
1805
|
-
explicit Func_void_QuantitySamplesWithAnchorResponse_Wrapper(std::function<void(const QuantitySamplesWithAnchorResponse& /* result */)>&& func): _function(std::
|
|
1805
|
+
explicit Func_void_QuantitySamplesWithAnchorResponse_Wrapper(std::function<void(const QuantitySamplesWithAnchorResponse& /* result */)>&& func): _function(std::make_unique<std::function<void(const QuantitySamplesWithAnchorResponse& /* result */)>>(std::move(func))) {}
|
|
1806
1806
|
inline void call(QuantitySamplesWithAnchorResponse result) const {
|
|
1807
1807
|
_function->operator()(result);
|
|
1808
1808
|
}
|
|
1809
1809
|
private:
|
|
1810
|
-
std::
|
|
1811
|
-
};
|
|
1810
|
+
std::unique_ptr<std::function<void(const QuantitySamplesWithAnchorResponse& /* result */)>> _function;
|
|
1811
|
+
} SWIFT_NONCOPYABLE;
|
|
1812
1812
|
Func_void_QuantitySamplesWithAnchorResponse create_Func_void_QuantitySamplesWithAnchorResponse(void* _Nonnull swiftClosureWrapper);
|
|
1813
1813
|
inline Func_void_QuantitySamplesWithAnchorResponse_Wrapper wrap_Func_void_QuantitySamplesWithAnchorResponse(Func_void_QuantitySamplesWithAnchorResponse value) {
|
|
1814
1814
|
return Func_void_QuantitySamplesWithAnchorResponse_Wrapper(std::move(value));
|
|
@@ -1926,13 +1926,13 @@ namespace margelo::nitro::healthkit::bridge::swift {
|
|
|
1926
1926
|
*/
|
|
1927
1927
|
class Func_void_std__vector_StateOfMindSample__Wrapper final {
|
|
1928
1928
|
public:
|
|
1929
|
-
explicit Func_void_std__vector_StateOfMindSample__Wrapper(std::function<void(const std::vector<StateOfMindSample>& /* result */)>&& func): _function(std::
|
|
1929
|
+
explicit Func_void_std__vector_StateOfMindSample__Wrapper(std::function<void(const std::vector<StateOfMindSample>& /* result */)>&& func): _function(std::make_unique<std::function<void(const std::vector<StateOfMindSample>& /* result */)>>(std::move(func))) {}
|
|
1930
1930
|
inline void call(std::vector<StateOfMindSample> result) const {
|
|
1931
1931
|
_function->operator()(result);
|
|
1932
1932
|
}
|
|
1933
1933
|
private:
|
|
1934
|
-
std::
|
|
1935
|
-
};
|
|
1934
|
+
std::unique_ptr<std::function<void(const std::vector<StateOfMindSample>& /* result */)>> _function;
|
|
1935
|
+
} SWIFT_NONCOPYABLE;
|
|
1936
1936
|
Func_void_std__vector_StateOfMindSample_ create_Func_void_std__vector_StateOfMindSample_(void* _Nonnull swiftClosureWrapper);
|
|
1937
1937
|
inline Func_void_std__vector_StateOfMindSample__Wrapper wrap_Func_void_std__vector_StateOfMindSample_(Func_void_std__vector_StateOfMindSample_ value) {
|
|
1938
1938
|
return Func_void_std__vector_StateOfMindSample__Wrapper(std::move(value));
|
|
@@ -2041,13 +2041,13 @@ namespace margelo::nitro::healthkit::bridge::swift {
|
|
|
2041
2041
|
*/
|
|
2042
2042
|
class Func_void_std__optional_WorkoutPlan__Wrapper final {
|
|
2043
2043
|
public:
|
|
2044
|
-
explicit Func_void_std__optional_WorkoutPlan__Wrapper(std::function<void(const std::optional<WorkoutPlan>& /* result */)>&& func): _function(std::
|
|
2044
|
+
explicit Func_void_std__optional_WorkoutPlan__Wrapper(std::function<void(const std::optional<WorkoutPlan>& /* result */)>&& func): _function(std::make_unique<std::function<void(const std::optional<WorkoutPlan>& /* result */)>>(std::move(func))) {}
|
|
2045
2045
|
inline void call(std::optional<WorkoutPlan> result) const {
|
|
2046
2046
|
_function->operator()(result);
|
|
2047
2047
|
}
|
|
2048
2048
|
private:
|
|
2049
|
-
std::
|
|
2050
|
-
};
|
|
2049
|
+
std::unique_ptr<std::function<void(const std::optional<WorkoutPlan>& /* result */)>> _function;
|
|
2050
|
+
} SWIFT_NONCOPYABLE;
|
|
2051
2051
|
Func_void_std__optional_WorkoutPlan_ create_Func_void_std__optional_WorkoutPlan_(void* _Nonnull swiftClosureWrapper);
|
|
2052
2052
|
inline Func_void_std__optional_WorkoutPlan__Wrapper wrap_Func_void_std__optional_WorkoutPlan_(Func_void_std__optional_WorkoutPlan_ value) {
|
|
2053
2053
|
return Func_void_std__optional_WorkoutPlan__Wrapper(std::move(value));
|
|
@@ -2097,13 +2097,13 @@ namespace margelo::nitro::healthkit::bridge::swift {
|
|
|
2097
2097
|
*/
|
|
2098
2098
|
class Func_void_std__vector_WorkoutRoute__Wrapper final {
|
|
2099
2099
|
public:
|
|
2100
|
-
explicit Func_void_std__vector_WorkoutRoute__Wrapper(std::function<void(const std::vector<WorkoutRoute>& /* result */)>&& func): _function(std::
|
|
2100
|
+
explicit Func_void_std__vector_WorkoutRoute__Wrapper(std::function<void(const std::vector<WorkoutRoute>& /* result */)>&& func): _function(std::make_unique<std::function<void(const std::vector<WorkoutRoute>& /* result */)>>(std::move(func))) {}
|
|
2101
2101
|
inline void call(std::vector<WorkoutRoute> result) const {
|
|
2102
2102
|
_function->operator()(result);
|
|
2103
2103
|
}
|
|
2104
2104
|
private:
|
|
2105
|
-
std::
|
|
2106
|
-
};
|
|
2105
|
+
std::unique_ptr<std::function<void(const std::vector<WorkoutRoute>& /* result */)>> _function;
|
|
2106
|
+
} SWIFT_NONCOPYABLE;
|
|
2107
2107
|
Func_void_std__vector_WorkoutRoute_ create_Func_void_std__vector_WorkoutRoute_(void* _Nonnull swiftClosureWrapper);
|
|
2108
2108
|
inline Func_void_std__vector_WorkoutRoute__Wrapper wrap_Func_void_std__vector_WorkoutRoute_(Func_void_std__vector_WorkoutRoute_ value) {
|
|
2109
2109
|
return Func_void_std__vector_WorkoutRoute__Wrapper(std::move(value));
|
|
@@ -2158,13 +2158,13 @@ namespace margelo::nitro::healthkit::bridge::swift {
|
|
|
2158
2158
|
*/
|
|
2159
2159
|
class Func_void_std__string_Wrapper final {
|
|
2160
2160
|
public:
|
|
2161
|
-
explicit Func_void_std__string_Wrapper(std::function<void(const std::string& /* result */)>&& func): _function(std::
|
|
2161
|
+
explicit Func_void_std__string_Wrapper(std::function<void(const std::string& /* result */)>&& func): _function(std::make_unique<std::function<void(const std::string& /* result */)>>(std::move(func))) {}
|
|
2162
2162
|
inline void call(std::string result) const {
|
|
2163
2163
|
_function->operator()(result);
|
|
2164
2164
|
}
|
|
2165
2165
|
private:
|
|
2166
|
-
std::
|
|
2167
|
-
};
|
|
2166
|
+
std::unique_ptr<std::function<void(const std::string& /* result */)>> _function;
|
|
2167
|
+
} SWIFT_NONCOPYABLE;
|
|
2168
2168
|
Func_void_std__string create_Func_void_std__string(void* _Nonnull swiftClosureWrapper);
|
|
2169
2169
|
inline Func_void_std__string_Wrapper wrap_Func_void_std__string(Func_void_std__string value) {
|
|
2170
2170
|
return Func_void_std__string_Wrapper(std::move(value));
|
|
@@ -2214,13 +2214,13 @@ namespace margelo::nitro::healthkit::bridge::swift {
|
|
|
2214
2214
|
*/
|
|
2215
2215
|
class Func_void_QueryWorkoutSamplesWithAnchorResponse_Wrapper final {
|
|
2216
2216
|
public:
|
|
2217
|
-
explicit Func_void_QueryWorkoutSamplesWithAnchorResponse_Wrapper(std::function<void(const QueryWorkoutSamplesWithAnchorResponse& /* result */)>&& func): _function(std::
|
|
2217
|
+
explicit Func_void_QueryWorkoutSamplesWithAnchorResponse_Wrapper(std::function<void(const QueryWorkoutSamplesWithAnchorResponse& /* result */)>&& func): _function(std::make_unique<std::function<void(const QueryWorkoutSamplesWithAnchorResponse& /* result */)>>(std::move(func))) {}
|
|
2218
2218
|
inline void call(QueryWorkoutSamplesWithAnchorResponse result) const {
|
|
2219
2219
|
_function->operator()(result);
|
|
2220
2220
|
}
|
|
2221
2221
|
private:
|
|
2222
|
-
std::
|
|
2223
|
-
};
|
|
2222
|
+
std::unique_ptr<std::function<void(const QueryWorkoutSamplesWithAnchorResponse& /* result */)>> _function;
|
|
2223
|
+
} SWIFT_NONCOPYABLE;
|
|
2224
2224
|
Func_void_QueryWorkoutSamplesWithAnchorResponse create_Func_void_QueryWorkoutSamplesWithAnchorResponse(void* _Nonnull swiftClosureWrapper);
|
|
2225
2225
|
inline Func_void_QueryWorkoutSamplesWithAnchorResponse_Wrapper wrap_Func_void_QueryWorkoutSamplesWithAnchorResponse(Func_void_QueryWorkoutSamplesWithAnchorResponse value) {
|
|
2226
2226
|
return Func_void_QueryWorkoutSamplesWithAnchorResponse_Wrapper(std::move(value));
|
|
@@ -2398,13 +2398,13 @@ namespace margelo::nitro::healthkit::bridge::swift {
|
|
|
2398
2398
|
*/
|
|
2399
2399
|
class Func_void_std__vector_std__shared_ptr_margelo__nitro__healthkit__HybridWorkoutProxySpec___Wrapper final {
|
|
2400
2400
|
public:
|
|
2401
|
-
explicit Func_void_std__vector_std__shared_ptr_margelo__nitro__healthkit__HybridWorkoutProxySpec___Wrapper(std::function<void(const std::vector<std::shared_ptr<margelo::nitro::healthkit::HybridWorkoutProxySpec>>& /* result */)>&& func): _function(std::
|
|
2401
|
+
explicit Func_void_std__vector_std__shared_ptr_margelo__nitro__healthkit__HybridWorkoutProxySpec___Wrapper(std::function<void(const std::vector<std::shared_ptr<margelo::nitro::healthkit::HybridWorkoutProxySpec>>& /* result */)>&& func): _function(std::make_unique<std::function<void(const std::vector<std::shared_ptr<margelo::nitro::healthkit::HybridWorkoutProxySpec>>& /* result */)>>(std::move(func))) {}
|
|
2402
2402
|
inline void call(std::vector<std::shared_ptr<margelo::nitro::healthkit::HybridWorkoutProxySpec>> result) const {
|
|
2403
2403
|
_function->operator()(result);
|
|
2404
2404
|
}
|
|
2405
2405
|
private:
|
|
2406
|
-
std::
|
|
2407
|
-
};
|
|
2406
|
+
std::unique_ptr<std::function<void(const std::vector<std::shared_ptr<margelo::nitro::healthkit::HybridWorkoutProxySpec>>& /* result */)>> _function;
|
|
2407
|
+
} SWIFT_NONCOPYABLE;
|
|
2408
2408
|
Func_void_std__vector_std__shared_ptr_margelo__nitro__healthkit__HybridWorkoutProxySpec__ create_Func_void_std__vector_std__shared_ptr_margelo__nitro__healthkit__HybridWorkoutProxySpec__(void* _Nonnull swiftClosureWrapper);
|
|
2409
2409
|
inline Func_void_std__vector_std__shared_ptr_margelo__nitro__healthkit__HybridWorkoutProxySpec___Wrapper wrap_Func_void_std__vector_std__shared_ptr_margelo__nitro__healthkit__HybridWorkoutProxySpec__(Func_void_std__vector_std__shared_ptr_margelo__nitro__healthkit__HybridWorkoutProxySpec__ value) {
|
|
2410
2410
|
return Func_void_std__vector_std__shared_ptr_margelo__nitro__healthkit__HybridWorkoutProxySpec___Wrapper(std::move(value));
|
|
@@ -273,7 +273,7 @@ namespace margelo::nitro::healthkit { struct WorkoutTotals; }
|
|
|
273
273
|
|
|
274
274
|
// Common C++ types used in Swift
|
|
275
275
|
#include <NitroModules/ArrayBufferHolder.hpp>
|
|
276
|
-
#include <NitroModules/
|
|
276
|
+
#include <NitroModules/AnyMapUtils.hpp>
|
|
277
277
|
#include <NitroModules/RuntimeError.hpp>
|
|
278
278
|
#include <NitroModules/DateToChronoDate.hpp>
|
|
279
279
|
|
|
@@ -18,7 +18,7 @@ public extension CategorySample {
|
|
|
18
18
|
/**
|
|
19
19
|
* Create a new instance of `CategorySample`.
|
|
20
20
|
*/
|
|
21
|
-
init(uuid: String, device: Device?, categoryType: CategoryTypeIdentifier, startDate: Date, endDate: Date, value: Double, metadata:
|
|
21
|
+
init(uuid: String, device: Device?, categoryType: CategoryTypeIdentifier, startDate: Date, endDate: Date, value: Double, metadata: AnyMap, sourceRevision: SourceRevision?) {
|
|
22
22
|
self.init(std.string(uuid), { () -> bridge.std__optional_Device_ in
|
|
23
23
|
if let __unwrappedValue = device {
|
|
24
24
|
return bridge.create_std__optional_Device_(__unwrappedValue)
|
|
@@ -112,10 +112,10 @@ public extension CategorySample {
|
|
|
112
112
|
}
|
|
113
113
|
}
|
|
114
114
|
|
|
115
|
-
var metadata:
|
|
115
|
+
var metadata: AnyMap {
|
|
116
116
|
@inline(__always)
|
|
117
117
|
get {
|
|
118
|
-
return
|
|
118
|
+
return AnyMap(withCppPart: self.__metadata)
|
|
119
119
|
}
|
|
120
120
|
@inline(__always)
|
|
121
121
|
set {
|
|
@@ -18,7 +18,7 @@ public extension CategorySampleForSaving {
|
|
|
18
18
|
/**
|
|
19
19
|
* Create a new instance of `CategorySampleForSaving`.
|
|
20
20
|
*/
|
|
21
|
-
init(start: Date, end: Date, categoryType: CategoryTypeIdentifier, value: Double, metadata:
|
|
21
|
+
init(start: Date, end: Date, categoryType: CategoryTypeIdentifier, value: Double, metadata: AnyMap, sourceRevision: SourceRevision?) {
|
|
22
22
|
self.init(start.toCpp(), end.toCpp(), categoryType, value, metadata.cppPart, { () -> bridge.std__optional_SourceRevision_ in
|
|
23
23
|
if let __unwrappedValue = sourceRevision {
|
|
24
24
|
return bridge.create_std__optional_SourceRevision_(__unwrappedValue)
|
|
@@ -72,10 +72,10 @@ public extension CategorySampleForSaving {
|
|
|
72
72
|
}
|
|
73
73
|
}
|
|
74
74
|
|
|
75
|
-
var metadata:
|
|
75
|
+
var metadata: AnyMap {
|
|
76
76
|
@inline(__always)
|
|
77
77
|
get {
|
|
78
|
-
return
|
|
78
|
+
return AnyMap(withCppPart: self.__metadata)
|
|
79
79
|
}
|
|
80
80
|
@inline(__always)
|
|
81
81
|
set {
|
|
@@ -18,7 +18,7 @@ public extension CorrelationSample {
|
|
|
18
18
|
/**
|
|
19
19
|
* Create a new instance of `CorrelationSample`.
|
|
20
20
|
*/
|
|
21
|
-
init(correlationType: CorrelationTypeIdentifier, objects: [CorrelationObject], metadata:
|
|
21
|
+
init(correlationType: CorrelationTypeIdentifier, objects: [CorrelationObject], metadata: AnyMap, startDate: Date, endDate: Date) {
|
|
22
22
|
self.init(correlationType, { () -> bridge.std__vector_std__variant_CategorySample__QuantitySample__ in
|
|
23
23
|
var __vector = bridge.create_std__vector_std__variant_CategorySample__QuantitySample__(objects.count)
|
|
24
24
|
for __item in objects {
|
|
@@ -82,10 +82,10 @@ public extension CorrelationSample {
|
|
|
82
82
|
}
|
|
83
83
|
}
|
|
84
84
|
|
|
85
|
-
var metadata:
|
|
85
|
+
var metadata: AnyMap {
|
|
86
86
|
@inline(__always)
|
|
87
87
|
get {
|
|
88
|
-
return
|
|
88
|
+
return AnyMap(withCppPart: self.__metadata)
|
|
89
89
|
}
|
|
90
90
|
@inline(__always)
|
|
91
91
|
set {
|
|
@@ -18,7 +18,7 @@ public extension DeletedSample {
|
|
|
18
18
|
/**
|
|
19
19
|
* Create a new instance of `DeletedSample`.
|
|
20
20
|
*/
|
|
21
|
-
init(uuid: String, metadata:
|
|
21
|
+
init(uuid: String, metadata: AnyMap?) {
|
|
22
22
|
self.init(std.string(uuid), { () -> bridge.std__optional_std__shared_ptr_AnyMap__ in
|
|
23
23
|
if let __unwrappedValue = metadata {
|
|
24
24
|
return bridge.create_std__optional_std__shared_ptr_AnyMap__(__unwrappedValue.cppPart)
|
|
@@ -39,12 +39,12 @@ public extension DeletedSample {
|
|
|
39
39
|
}
|
|
40
40
|
}
|
|
41
41
|
|
|
42
|
-
var metadata:
|
|
42
|
+
var metadata: AnyMap? {
|
|
43
43
|
@inline(__always)
|
|
44
44
|
get {
|
|
45
|
-
return { () ->
|
|
45
|
+
return { () -> AnyMap? in
|
|
46
46
|
if let __unwrapped = self.__metadata.value {
|
|
47
|
-
return
|
|
47
|
+
return AnyMap(withCppPart: __unwrapped)
|
|
48
48
|
} else {
|
|
49
49
|
return nil
|
|
50
50
|
}
|
|
@@ -18,7 +18,7 @@ public extension HeartbeatSeriesSample {
|
|
|
18
18
|
/**
|
|
19
19
|
* Create a new instance of `HeartbeatSeriesSample`.
|
|
20
20
|
*/
|
|
21
|
-
init(uuid: String, device: Device?, startDate: Date, endDate: Date, heartbeats: [Heartbeat], metadata:
|
|
21
|
+
init(uuid: String, device: Device?, startDate: Date, endDate: Date, heartbeats: [Heartbeat], metadata: AnyMap?, sourceRevision: SourceRevision?) {
|
|
22
22
|
self.init(std.string(uuid), { () -> bridge.std__optional_Device_ in
|
|
23
23
|
if let __unwrappedValue = device {
|
|
24
24
|
return bridge.create_std__optional_Device_(__unwrappedValue)
|
|
@@ -119,12 +119,12 @@ public extension HeartbeatSeriesSample {
|
|
|
119
119
|
}
|
|
120
120
|
}
|
|
121
121
|
|
|
122
|
-
var metadata:
|
|
122
|
+
var metadata: AnyMap? {
|
|
123
123
|
@inline(__always)
|
|
124
124
|
get {
|
|
125
|
-
return { () ->
|
|
125
|
+
return { () -> AnyMap? in
|
|
126
126
|
if let __unwrapped = self.__metadata.value {
|
|
127
|
-
return
|
|
127
|
+
return AnyMap(withCppPart: __unwrapped)
|
|
128
128
|
} else {
|
|
129
129
|
return nil
|
|
130
130
|
}
|
|
@@ -14,7 +14,7 @@ public protocol HybridCategoryTypeModuleSpec_protocol: HybridObject {
|
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
// Methods
|
|
17
|
-
func saveCategorySample(identifier: CategoryTypeIdentifier, value: Double, startDate: Date, endDate: Date, metadata:
|
|
17
|
+
func saveCategorySample(identifier: CategoryTypeIdentifier, value: Double, startDate: Date, endDate: Date, metadata: AnyMap) throws -> Promise<Bool>
|
|
18
18
|
func queryCategorySamples(identifier: CategoryTypeIdentifier, options: QueryOptionsWithSortOrder?) throws -> Promise<[CategorySample]>
|
|
19
19
|
func queryCategorySamplesWithAnchor(identifier: CategoryTypeIdentifier, options: QueryOptionsWithAnchor) throws -> Promise<CategorySamplesWithAnchorResponse>
|
|
20
20
|
}
|
|
@@ -101,9 +101,9 @@ public class HybridCategoryTypeModuleSpec_cxx {
|
|
|
101
101
|
|
|
102
102
|
// Methods
|
|
103
103
|
@inline(__always)
|
|
104
|
-
public final func saveCategorySample(identifier: Int32, value: Double, startDate: margelo.nitro.chrono_time, endDate: margelo.nitro.chrono_time, metadata: margelo.nitro.
|
|
104
|
+
public final func saveCategorySample(identifier: Int32, value: Double, startDate: margelo.nitro.chrono_time, endDate: margelo.nitro.chrono_time, metadata: margelo.nitro.SharedAnyMap) -> bridge.Result_std__shared_ptr_Promise_bool___ {
|
|
105
105
|
do {
|
|
106
|
-
let __result = try self.__implementation.saveCategorySample(identifier: margelo.nitro.healthkit.CategoryTypeIdentifier(rawValue: identifier)!, value: value, startDate: Date(fromChrono: startDate), endDate: Date(fromChrono: endDate), metadata:
|
|
106
|
+
let __result = try self.__implementation.saveCategorySample(identifier: margelo.nitro.healthkit.CategoryTypeIdentifier(rawValue: identifier)!, value: value, startDate: Date(fromChrono: startDate), endDate: Date(fromChrono: endDate), metadata: AnyMap(withCppPart: metadata))
|
|
107
107
|
let __resultCpp = { () -> bridge.std__shared_ptr_Promise_bool__ in
|
|
108
108
|
let __promise = bridge.create_std__shared_ptr_Promise_bool__()
|
|
109
109
|
let __promiseHolder = bridge.wrap_std__shared_ptr_Promise_bool__(__promise)
|
|
@@ -14,7 +14,7 @@ public protocol HybridCorrelationTypeModuleSpec_protocol: HybridObject {
|
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
// Methods
|
|
17
|
-
func saveCorrelationSample(typeIdentifier: CorrelationTypeIdentifier, samples: [SampleForSaving], start: Date, end: Date, metadata:
|
|
17
|
+
func saveCorrelationSample(typeIdentifier: CorrelationTypeIdentifier, samples: [SampleForSaving], start: Date, end: Date, metadata: AnyMap) throws -> Promise<Bool>
|
|
18
18
|
func queryCorrelationSamples(typeIdentifier: CorrelationTypeIdentifier, from: Date, to: Date) throws -> Promise<[CorrelationSample]>
|
|
19
19
|
}
|
|
20
20
|
|
|
@@ -101,7 +101,7 @@ public class HybridCorrelationTypeModuleSpec_cxx {
|
|
|
101
101
|
|
|
102
102
|
// Methods
|
|
103
103
|
@inline(__always)
|
|
104
|
-
public final func saveCorrelationSample(typeIdentifier: Int32, samples: bridge.std__vector_std__variant_CategorySampleForSaving__QuantitySampleForSaving__, start: margelo.nitro.chrono_time, end: margelo.nitro.chrono_time, metadata: margelo.nitro.
|
|
104
|
+
public final func saveCorrelationSample(typeIdentifier: Int32, samples: bridge.std__vector_std__variant_CategorySampleForSaving__QuantitySampleForSaving__, start: margelo.nitro.chrono_time, end: margelo.nitro.chrono_time, metadata: margelo.nitro.SharedAnyMap) -> bridge.Result_std__shared_ptr_Promise_bool___ {
|
|
105
105
|
do {
|
|
106
106
|
let __result = try self.__implementation.saveCorrelationSample(typeIdentifier: margelo.nitro.healthkit.CorrelationTypeIdentifier(rawValue: typeIdentifier)!, samples: samples.map({ __item in { () -> SampleForSaving in
|
|
107
107
|
let __variant = bridge.std__variant_CategorySampleForSaving__QuantitySampleForSaving_(__item)
|
|
@@ -115,7 +115,7 @@ public class HybridCorrelationTypeModuleSpec_cxx {
|
|
|
115
115
|
default:
|
|
116
116
|
fatalError("Variant can never have index \(__variant.index())!")
|
|
117
117
|
}
|
|
118
|
-
}() }), start: Date(fromChrono: start), end: Date(fromChrono: end), metadata:
|
|
118
|
+
}() }), start: Date(fromChrono: start), end: Date(fromChrono: end), metadata: AnyMap(withCppPart: metadata))
|
|
119
119
|
let __resultCpp = { () -> bridge.std__shared_ptr_Promise_bool__ in
|
|
120
120
|
let __promise = bridge.create_std__shared_ptr_Promise_bool__()
|
|
121
121
|
let __promiseHolder = bridge.wrap_std__shared_ptr_Promise_bool__(__promise)
|
|
@@ -15,7 +15,7 @@ public protocol HybridQuantityTypeModuleSpec_protocol: HybridObject {
|
|
|
15
15
|
|
|
16
16
|
// Methods
|
|
17
17
|
func isQuantityCompatibleWithUnit(identifier: QuantityTypeIdentifier, unit: String) throws -> Bool
|
|
18
|
-
func saveQuantitySample(identifier: QuantityTypeIdentifier, unit: String, value: Double, start: Date, end: Date, metadata:
|
|
18
|
+
func saveQuantitySample(identifier: QuantityTypeIdentifier, unit: String, value: Double, start: Date, end: Date, metadata: AnyMap) throws -> Promise<Bool>
|
|
19
19
|
func deleteQuantitySamples(identifier: QuantityTypeIdentifier, filter: FilterForSamples) throws -> Promise<Bool>
|
|
20
20
|
func queryQuantitySamples(identifier: QuantityTypeIdentifier, options: QueryOptionsWithSortOrderAndUnit?) throws -> Promise<[QuantitySample]>
|
|
21
21
|
func queryStatisticsForQuantity(identifier: QuantityTypeIdentifier, statistics: [StatisticsOptions], options: StatisticsQueryOptions?) throws -> Promise<QueryStatisticsResponse>
|
|
@@ -113,9 +113,9 @@ public class HybridQuantityTypeModuleSpec_cxx {
|
|
|
113
113
|
}
|
|
114
114
|
|
|
115
115
|
@inline(__always)
|
|
116
|
-
public final func saveQuantitySample(identifier: Int32, unit: std.string, value: Double, start: margelo.nitro.chrono_time, end: margelo.nitro.chrono_time, metadata: margelo.nitro.
|
|
116
|
+
public final func saveQuantitySample(identifier: Int32, unit: std.string, value: Double, start: margelo.nitro.chrono_time, end: margelo.nitro.chrono_time, metadata: margelo.nitro.SharedAnyMap) -> bridge.Result_std__shared_ptr_Promise_bool___ {
|
|
117
117
|
do {
|
|
118
|
-
let __result = try self.__implementation.saveQuantitySample(identifier: margelo.nitro.healthkit.QuantityTypeIdentifier(rawValue: identifier)!, unit: String(unit), value: value, start: Date(fromChrono: start), end: Date(fromChrono: end), metadata:
|
|
118
|
+
let __result = try self.__implementation.saveQuantitySample(identifier: margelo.nitro.healthkit.QuantityTypeIdentifier(rawValue: identifier)!, unit: String(unit), value: value, start: Date(fromChrono: start), end: Date(fromChrono: end), metadata: AnyMap(withCppPart: metadata))
|
|
119
119
|
let __resultCpp = { () -> bridge.std__shared_ptr_Promise_bool__ in
|
|
120
120
|
let __promise = bridge.create_std__shared_ptr_Promise_bool__()
|
|
121
121
|
let __promiseHolder = bridge.wrap_std__shared_ptr_Promise_bool__(__promise)
|
|
@@ -15,7 +15,7 @@ public protocol HybridStateOfMindModuleSpec_protocol: HybridObject {
|
|
|
15
15
|
|
|
16
16
|
// Methods
|
|
17
17
|
func queryStateOfMindSamples(options: QueryOptionsWithSortOrder?) throws -> Promise<[StateOfMindSample]>
|
|
18
|
-
func saveStateOfMindSample(date: Date, kind: StateOfMindKind, valence: Double, labels: [StateOfMindLabel], associations: [StateOfMindAssociation], metadata:
|
|
18
|
+
func saveStateOfMindSample(date: Date, kind: StateOfMindKind, valence: Double, labels: [StateOfMindLabel], associations: [StateOfMindAssociation], metadata: AnyMap?) throws -> Promise<Bool>
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
/// See ``HybridStateOfMindModuleSpec``
|
|
@@ -134,9 +134,9 @@ public class HybridStateOfMindModuleSpec_cxx {
|
|
|
134
134
|
@inline(__always)
|
|
135
135
|
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___ {
|
|
136
136
|
do {
|
|
137
|
-
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: { () ->
|
|
137
|
+
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
|
|
138
138
|
if let __unwrapped = metadata.value {
|
|
139
|
-
return
|
|
139
|
+
return AnyMap(withCppPart: __unwrapped)
|
|
140
140
|
} else {
|
|
141
141
|
return nil
|
|
142
142
|
}
|
|
@@ -21,7 +21,7 @@ public protocol HybridWorkoutProxySpec_protocol: HybridObject {
|
|
|
21
21
|
var totalFlightsClimbed: Quantity? { get }
|
|
22
22
|
var startDate: Date { get }
|
|
23
23
|
var endDate: Date { get }
|
|
24
|
-
var metadata:
|
|
24
|
+
var metadata: AnyMap? { get }
|
|
25
25
|
var sourceRevision: SourceRevision? { get }
|
|
26
26
|
var events: [WorkoutEvent]? { get }
|
|
27
27
|
var activities: [WorkoutActivity]? { get }
|
|
@@ -14,7 +14,7 @@ public protocol HybridWorkoutsModuleSpec_protocol: HybridObject {
|
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
// Methods
|
|
17
|
-
func saveWorkoutSample(workoutActivityType: WorkoutActivityType, quantities: [QuantitySampleForSaving], startDate: Date, endDate: Date, totals: WorkoutTotals, metadata:
|
|
17
|
+
func saveWorkoutSample(workoutActivityType: WorkoutActivityType, quantities: [QuantitySampleForSaving], startDate: Date, endDate: Date, totals: WorkoutTotals, metadata: AnyMap) throws -> Promise<String>
|
|
18
18
|
func queryWorkoutSamplesWithAnchor(options: WorkoutQueryOptionsWithAnchor) throws -> Promise<QueryWorkoutSamplesWithAnchorResponse>
|
|
19
19
|
func queryWorkoutSamples(options: WorkoutQueryOptions) throws -> Promise<[(any HybridWorkoutProxySpec)]>
|
|
20
20
|
func startWatchAppWithWorkoutConfiguration(workoutConfiguration: WorkoutConfiguration) throws -> Promise<Bool>
|
|
@@ -101,9 +101,9 @@ public class HybridWorkoutsModuleSpec_cxx {
|
|
|
101
101
|
|
|
102
102
|
// Methods
|
|
103
103
|
@inline(__always)
|
|
104
|
-
public final func saveWorkoutSample(workoutActivityType: Int32, quantities: bridge.std__vector_QuantitySampleForSaving_, startDate: margelo.nitro.chrono_time, endDate: margelo.nitro.chrono_time, totals: WorkoutTotals, metadata: margelo.nitro.
|
|
104
|
+
public final func saveWorkoutSample(workoutActivityType: Int32, quantities: bridge.std__vector_QuantitySampleForSaving_, startDate: margelo.nitro.chrono_time, endDate: margelo.nitro.chrono_time, totals: WorkoutTotals, metadata: margelo.nitro.SharedAnyMap) -> bridge.Result_std__shared_ptr_Promise_std__string___ {
|
|
105
105
|
do {
|
|
106
|
-
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:
|
|
106
|
+
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: AnyMap(withCppPart: metadata))
|
|
107
107
|
let __resultCpp = { () -> bridge.std__shared_ptr_Promise_std__string__ in
|
|
108
108
|
let __promise = bridge.create_std__shared_ptr_Promise_std__string__()
|
|
109
109
|
let __promiseHolder = bridge.wrap_std__shared_ptr_Promise_std__string__(__promise)
|
|
@@ -18,7 +18,7 @@ public extension QuantitySample {
|
|
|
18
18
|
/**
|
|
19
19
|
* Create a new instance of `QuantitySample`.
|
|
20
20
|
*/
|
|
21
|
-
init(uuid: String, device: Device?, quantityType: QuantityTypeIdentifier, startDate: Date, endDate: Date, quantity: Double, unit: String, metadata:
|
|
21
|
+
init(uuid: String, device: Device?, quantityType: QuantityTypeIdentifier, startDate: Date, endDate: Date, quantity: Double, unit: String, metadata: AnyMap, sourceRevision: SourceRevision?) {
|
|
22
22
|
self.init(std.string(uuid), { () -> bridge.std__optional_Device_ in
|
|
23
23
|
if let __unwrappedValue = device {
|
|
24
24
|
return bridge.create_std__optional_Device_(__unwrappedValue)
|
|
@@ -123,10 +123,10 @@ public extension QuantitySample {
|
|
|
123
123
|
}
|
|
124
124
|
}
|
|
125
125
|
|
|
126
|
-
var metadata:
|
|
126
|
+
var metadata: AnyMap {
|
|
127
127
|
@inline(__always)
|
|
128
128
|
get {
|
|
129
|
-
return
|
|
129
|
+
return AnyMap(withCppPart: self.__metadata)
|
|
130
130
|
}
|
|
131
131
|
@inline(__always)
|
|
132
132
|
set {
|
|
@@ -18,7 +18,7 @@ public extension QuantitySampleForSaving {
|
|
|
18
18
|
/**
|
|
19
19
|
* Create a new instance of `QuantitySampleForSaving`.
|
|
20
20
|
*/
|
|
21
|
-
init(startDate: Date, endDate: Date, quantityType: QuantityTypeIdentifier, quantity: Double, unit: String, metadata:
|
|
21
|
+
init(startDate: Date, endDate: Date, quantityType: QuantityTypeIdentifier, quantity: Double, unit: String, metadata: AnyMap, sourceRevision: SourceRevision?) {
|
|
22
22
|
self.init(startDate.toCpp(), endDate.toCpp(), quantityType, quantity, std.string(unit), metadata.cppPart, { () -> bridge.std__optional_SourceRevision_ in
|
|
23
23
|
if let __unwrappedValue = sourceRevision {
|
|
24
24
|
return bridge.create_std__optional_SourceRevision_(__unwrappedValue)
|
|
@@ -83,10 +83,10 @@ public extension QuantitySampleForSaving {
|
|
|
83
83
|
}
|
|
84
84
|
}
|
|
85
85
|
|
|
86
|
-
var metadata:
|
|
86
|
+
var metadata: AnyMap {
|
|
87
87
|
@inline(__always)
|
|
88
88
|
get {
|
|
89
|
-
return
|
|
89
|
+
return AnyMap(withCppPart: self.__metadata)
|
|
90
90
|
}
|
|
91
91
|
@inline(__always)
|
|
92
92
|
set {
|
|
@@ -18,7 +18,7 @@ public extension StateOfMindSample {
|
|
|
18
18
|
/**
|
|
19
19
|
* Create a new instance of `StateOfMindSample`.
|
|
20
20
|
*/
|
|
21
|
-
init(uuid: String, device: Device?, startDate: Date, endDate: Date, metadata:
|
|
21
|
+
init(uuid: String, device: Device?, startDate: Date, endDate: Date, metadata: AnyMap?, sourceRevision: SourceRevision?, valence: Double, kind: StateOfMindKind, valenceClassification: StateOfMindValenceClassification, associations: [StateOfMindAssociation], labels: [StateOfMindLabel]) {
|
|
22
22
|
self.init(std.string(uuid), { () -> bridge.std__optional_Device_ in
|
|
23
23
|
if let __unwrappedValue = device {
|
|
24
24
|
return bridge.create_std__optional_Device_(__unwrappedValue)
|
|
@@ -108,12 +108,12 @@ public extension StateOfMindSample {
|
|
|
108
108
|
}
|
|
109
109
|
}
|
|
110
110
|
|
|
111
|
-
var metadata:
|
|
111
|
+
var metadata: AnyMap? {
|
|
112
112
|
@inline(__always)
|
|
113
113
|
get {
|
|
114
|
-
return { () ->
|
|
114
|
+
return { () -> AnyMap? in
|
|
115
115
|
if let __unwrapped = self.__metadata.value {
|
|
116
|
-
return
|
|
116
|
+
return AnyMap(withCppPart: __unwrapped)
|
|
117
117
|
} else {
|
|
118
118
|
return nil
|
|
119
119
|
}
|
|
@@ -18,7 +18,7 @@ public extension WorkoutSample {
|
|
|
18
18
|
/**
|
|
19
19
|
* Create a new instance of `WorkoutSample`.
|
|
20
20
|
*/
|
|
21
|
-
init(uuid: String, device: Device?, workoutActivityType: WorkoutActivityType, duration: Quantity, totalDistance: Quantity?, totalEnergyBurned: Quantity?, totalSwimmingStrokeCount: Quantity?, totalFlightsClimbed: Quantity?, startDate: Date, endDate: Date, metadata:
|
|
21
|
+
init(uuid: String, device: Device?, workoutActivityType: WorkoutActivityType, duration: Quantity, totalDistance: Quantity?, totalEnergyBurned: Quantity?, totalSwimmingStrokeCount: Quantity?, totalFlightsClimbed: Quantity?, startDate: Date, endDate: Date, metadata: AnyMap?, sourceRevision: SourceRevision?, events: [WorkoutEvent]?, activities: [WorkoutActivity]?) {
|
|
22
22
|
self.init(std.string(uuid), { () -> bridge.std__optional_Device_ in
|
|
23
23
|
if let __unwrappedValue = device {
|
|
24
24
|
return bridge.create_std__optional_Device_(__unwrappedValue)
|
|
@@ -258,12 +258,12 @@ public extension WorkoutSample {
|
|
|
258
258
|
}
|
|
259
259
|
}
|
|
260
260
|
|
|
261
|
-
var metadata:
|
|
261
|
+
var metadata: AnyMap? {
|
|
262
262
|
@inline(__always)
|
|
263
263
|
get {
|
|
264
|
-
return { () ->
|
|
264
|
+
return { () -> AnyMap? in
|
|
265
265
|
if let __unwrapped = self.__metadata.value {
|
|
266
|
-
return
|
|
266
|
+
return AnyMap(withCppPart: __unwrapped)
|
|
267
267
|
} else {
|
|
268
268
|
return nil
|
|
269
269
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kingstinct/react-native-healthkit",
|
|
3
|
-
"version": "9.0.
|
|
3
|
+
"version": "9.0.11",
|
|
4
4
|
"description": "React Native bindings for HealthKit",
|
|
5
5
|
"main": "lib/commonjs/index.js",
|
|
6
6
|
"module": "lib/module/index.js",
|
|
@@ -90,10 +90,10 @@
|
|
|
90
90
|
"devDependencies": {
|
|
91
91
|
"@testing-library/react-native": "^13.2.0",
|
|
92
92
|
"@types/react": "~19.0.14",
|
|
93
|
-
"nitro-codegen": "^0.26.
|
|
93
|
+
"nitro-codegen": "^0.26.4",
|
|
94
94
|
"react": "19.0.0",
|
|
95
95
|
"react-native": "*",
|
|
96
|
-
"react-native-nitro-modules": "^0.26.
|
|
96
|
+
"react-native-nitro-modules": "^0.26.4",
|
|
97
97
|
"typescript": "~5.8.3"
|
|
98
98
|
},
|
|
99
99
|
"peerDependencies": {
|