@kingstinct/react-native-healthkit 11.1.2 → 12.0.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/ios/CoreModule.swift +6 -6
- package/ios/Helpers.swift +4 -4
- package/ios/QuantityTypeModule.swift +3 -8
- package/ios/WorkoutsModule.swift +9 -11
- package/lib/commonjs/hooks/useHealthkitAuthorization.js +14 -8
- package/lib/module/hooks/useHealthkitAuthorization.js +14 -8
- package/lib/typescript/healthkit.d.ts +10 -7
- package/lib/typescript/healthkit.ios.d.ts +16 -13
- package/lib/typescript/hooks/useHealthkitAuthorization.d.ts +4 -1
- 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/Workouts.d.ts +1 -1
- 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/hooks/useHealthkitAuthorization.test.ts +12 -4
- package/src/hooks/useHealthkitAuthorization.ts +20 -14
- 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/Workouts.ts +1 -1
|
@@ -8,8 +8,6 @@
|
|
|
8
8
|
#pragma once
|
|
9
9
|
|
|
10
10
|
// Forward declarations of C++ defined types
|
|
11
|
-
// Forward declaration of `AnyMap` to properly resolve imports.
|
|
12
|
-
namespace NitroModules { class AnyMap; }
|
|
13
11
|
// Forward declaration of `AuthorizationRequestStatus` to properly resolve imports.
|
|
14
12
|
namespace margelo::nitro::healthkit { enum class AuthorizationRequestStatus; }
|
|
15
13
|
// Forward declaration of `AuthorizationStatus` to properly resolve imports.
|
|
@@ -174,6 +172,8 @@ namespace margelo::nitro::healthkit { struct WorkoutRoute; }
|
|
|
174
172
|
namespace margelo::nitro::healthkit { struct WorkoutSample; }
|
|
175
173
|
// Forward declaration of `WorkoutSessionLocationType` to properly resolve imports.
|
|
176
174
|
namespace margelo::nitro::healthkit { enum class WorkoutSessionLocationType; }
|
|
175
|
+
// Forward declaration of `WorkoutTotals` to properly resolve imports.
|
|
176
|
+
namespace margelo::nitro::healthkit { struct WorkoutTotals; }
|
|
177
177
|
|
|
178
178
|
// Forward declarations of Swift defined types
|
|
179
179
|
// Forward declaration of `HybridCategoryTypeModuleSpec_cxx` to properly resolve imports.
|
|
@@ -282,8 +282,8 @@ namespace ReactNativeHealthkit { class HybridWorkoutsModuleSpec_cxx; }
|
|
|
282
282
|
#include "WorkoutRouteLocation.hpp"
|
|
283
283
|
#include "WorkoutSample.hpp"
|
|
284
284
|
#include "WorkoutSessionLocationType.hpp"
|
|
285
|
+
#include "WorkoutTotals.hpp"
|
|
285
286
|
#include <NitroModules/AnyMap.hpp>
|
|
286
|
-
#include <NitroModules/FastVectorCopy.hpp>
|
|
287
287
|
#include <NitroModules/Promise.hpp>
|
|
288
288
|
#include <NitroModules/PromiseHolder.hpp>
|
|
289
289
|
#include <NitroModules/Result.hpp>
|
|
@@ -517,59 +517,59 @@ namespace margelo::nitro::healthkit::bridge::swift {
|
|
|
517
517
|
return *optional;
|
|
518
518
|
}
|
|
519
519
|
|
|
520
|
-
// pragma MARK: std::variant<std::string, double,
|
|
520
|
+
// pragma MARK: std::variant<bool, std::string, double, std::chrono::system_clock::time_point>
|
|
521
521
|
/**
|
|
522
|
-
* Wrapper struct for `std::variant<std::string, double,
|
|
522
|
+
* Wrapper struct for `std::variant<bool, std::string, double, std::chrono::system_clock::time_point>`.
|
|
523
523
|
* std::variant cannot be used in Swift because of a Swift bug.
|
|
524
524
|
* Not even specializing it works. So we create a wrapper struct.
|
|
525
525
|
*/
|
|
526
|
-
struct
|
|
527
|
-
std::variant<std::string, double,
|
|
528
|
-
|
|
529
|
-
operator std::variant<std::string, double,
|
|
526
|
+
struct std__variant_bool__std__string__double__std__chrono__system_clock__time_point_ {
|
|
527
|
+
std::variant<bool, std::string, double, std::chrono::system_clock::time_point> variant;
|
|
528
|
+
std__variant_bool__std__string__double__std__chrono__system_clock__time_point_(std::variant<bool, std::string, double, std::chrono::system_clock::time_point> variant): variant(variant) { }
|
|
529
|
+
operator std::variant<bool, std::string, double, std::chrono::system_clock::time_point>() const noexcept {
|
|
530
530
|
return variant;
|
|
531
531
|
}
|
|
532
532
|
inline size_t index() const noexcept {
|
|
533
533
|
return variant.index();
|
|
534
534
|
}
|
|
535
|
-
inline
|
|
535
|
+
inline bool get_0() const noexcept {
|
|
536
536
|
return std::get<0>(variant);
|
|
537
537
|
}
|
|
538
|
-
inline
|
|
538
|
+
inline std::string get_1() const noexcept {
|
|
539
539
|
return std::get<1>(variant);
|
|
540
540
|
}
|
|
541
|
-
inline
|
|
541
|
+
inline double get_2() const noexcept {
|
|
542
542
|
return std::get<2>(variant);
|
|
543
543
|
}
|
|
544
544
|
inline std::chrono::system_clock::time_point get_3() const noexcept {
|
|
545
545
|
return std::get<3>(variant);
|
|
546
546
|
}
|
|
547
547
|
};
|
|
548
|
-
inline
|
|
549
|
-
return
|
|
548
|
+
inline std__variant_bool__std__string__double__std__chrono__system_clock__time_point_ create_std__variant_bool__std__string__double__std__chrono__system_clock__time_point_(bool value) noexcept {
|
|
549
|
+
return std__variant_bool__std__string__double__std__chrono__system_clock__time_point_(value);
|
|
550
550
|
}
|
|
551
|
-
inline
|
|
552
|
-
return
|
|
551
|
+
inline std__variant_bool__std__string__double__std__chrono__system_clock__time_point_ create_std__variant_bool__std__string__double__std__chrono__system_clock__time_point_(const std::string& value) noexcept {
|
|
552
|
+
return std__variant_bool__std__string__double__std__chrono__system_clock__time_point_(value);
|
|
553
553
|
}
|
|
554
|
-
inline
|
|
555
|
-
return
|
|
554
|
+
inline std__variant_bool__std__string__double__std__chrono__system_clock__time_point_ create_std__variant_bool__std__string__double__std__chrono__system_clock__time_point_(double value) noexcept {
|
|
555
|
+
return std__variant_bool__std__string__double__std__chrono__system_clock__time_point_(value);
|
|
556
556
|
}
|
|
557
|
-
inline
|
|
558
|
-
return
|
|
557
|
+
inline std__variant_bool__std__string__double__std__chrono__system_clock__time_point_ create_std__variant_bool__std__string__double__std__chrono__system_clock__time_point_(std::chrono::system_clock::time_point value) noexcept {
|
|
558
|
+
return std__variant_bool__std__string__double__std__chrono__system_clock__time_point_(value);
|
|
559
559
|
}
|
|
560
560
|
|
|
561
|
-
// pragma MARK: std::optional<std::variant<std::string, double,
|
|
561
|
+
// pragma MARK: std::optional<std::variant<bool, std::string, double, std::chrono::system_clock::time_point>>
|
|
562
562
|
/**
|
|
563
|
-
* Specialized version of `std::optional<std::variant<std::string, double,
|
|
563
|
+
* Specialized version of `std::optional<std::variant<bool, std::string, double, std::chrono::system_clock::time_point>>`.
|
|
564
564
|
*/
|
|
565
|
-
using
|
|
566
|
-
inline std::optional<std::variant<std::string, double,
|
|
567
|
-
return std::optional<std::variant<std::string, double,
|
|
565
|
+
using std__optional_std__variant_bool__std__string__double__std__chrono__system_clock__time_point__ = std::optional<std::variant<bool, std::string, double, std::chrono::system_clock::time_point>>;
|
|
566
|
+
inline std::optional<std::variant<bool, std::string, double, std::chrono::system_clock::time_point>> create_std__optional_std__variant_bool__std__string__double__std__chrono__system_clock__time_point__(const std::variant<bool, std::string, double, std::chrono::system_clock::time_point>& value) noexcept {
|
|
567
|
+
return std::optional<std::variant<bool, std::string, double, std::chrono::system_clock::time_point>>(value);
|
|
568
568
|
}
|
|
569
|
-
inline bool
|
|
569
|
+
inline bool has_value_std__optional_std__variant_bool__std__string__double__std__chrono__system_clock__time_point__(const std::optional<std::variant<bool, std::string, double, std::chrono::system_clock::time_point>>& optional) noexcept {
|
|
570
570
|
return optional.has_value();
|
|
571
571
|
}
|
|
572
|
-
inline std::variant<std::string, double,
|
|
572
|
+
inline std::variant<bool, std::string, double, std::chrono::system_clock::time_point> get_std__optional_std__variant_bool__std__string__double__std__chrono__system_clock__time_point__(const std::optional<std::variant<bool, std::string, double, std::chrono::system_clock::time_point>>& optional) noexcept {
|
|
573
573
|
return *optional;
|
|
574
574
|
}
|
|
575
575
|
|
|
@@ -1183,11 +1183,10 @@ namespace margelo::nitro::healthkit::bridge::swift {
|
|
|
1183
1183
|
* Specialized version of `std::vector<QuantityTypeIdentifier>`.
|
|
1184
1184
|
*/
|
|
1185
1185
|
using std__vector_QuantityTypeIdentifier_ = std::vector<QuantityTypeIdentifier>;
|
|
1186
|
-
inline std::vector<QuantityTypeIdentifier>
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
return vector.data();
|
|
1186
|
+
inline std::vector<QuantityTypeIdentifier> create_std__vector_QuantityTypeIdentifier_(size_t size) noexcept {
|
|
1187
|
+
std::vector<QuantityTypeIdentifier> vector;
|
|
1188
|
+
vector.reserve(size);
|
|
1189
|
+
return vector;
|
|
1191
1190
|
}
|
|
1192
1191
|
|
|
1193
1192
|
// pragma MARK: std::vector<std::shared_ptr<HybridSourceProxySpec>>
|
|
@@ -1330,11 +1329,25 @@ namespace margelo::nitro::healthkit::bridge::swift {
|
|
|
1330
1329
|
* Specialized version of `std::vector<SampleTypeIdentifierWriteable>`.
|
|
1331
1330
|
*/
|
|
1332
1331
|
using std__vector_SampleTypeIdentifierWriteable_ = std::vector<SampleTypeIdentifierWriteable>;
|
|
1333
|
-
inline std::vector<SampleTypeIdentifierWriteable>
|
|
1334
|
-
|
|
1332
|
+
inline std::vector<SampleTypeIdentifierWriteable> create_std__vector_SampleTypeIdentifierWriteable_(size_t size) noexcept {
|
|
1333
|
+
std::vector<SampleTypeIdentifierWriteable> vector;
|
|
1334
|
+
vector.reserve(size);
|
|
1335
|
+
return vector;
|
|
1335
1336
|
}
|
|
1336
|
-
|
|
1337
|
-
|
|
1337
|
+
|
|
1338
|
+
// pragma MARK: std::optional<std::vector<SampleTypeIdentifierWriteable>>
|
|
1339
|
+
/**
|
|
1340
|
+
* Specialized version of `std::optional<std::vector<SampleTypeIdentifierWriteable>>`.
|
|
1341
|
+
*/
|
|
1342
|
+
using std__optional_std__vector_SampleTypeIdentifierWriteable__ = std::optional<std::vector<SampleTypeIdentifierWriteable>>;
|
|
1343
|
+
inline std::optional<std::vector<SampleTypeIdentifierWriteable>> create_std__optional_std__vector_SampleTypeIdentifierWriteable__(const std::vector<SampleTypeIdentifierWriteable>& value) noexcept {
|
|
1344
|
+
return std::optional<std::vector<SampleTypeIdentifierWriteable>>(value);
|
|
1345
|
+
}
|
|
1346
|
+
inline bool has_value_std__optional_std__vector_SampleTypeIdentifierWriteable__(const std::optional<std::vector<SampleTypeIdentifierWriteable>>& optional) noexcept {
|
|
1347
|
+
return optional.has_value();
|
|
1348
|
+
}
|
|
1349
|
+
inline std::vector<SampleTypeIdentifierWriteable> get_std__optional_std__vector_SampleTypeIdentifierWriteable__(const std::optional<std::vector<SampleTypeIdentifierWriteable>>& optional) noexcept {
|
|
1350
|
+
return *optional;
|
|
1338
1351
|
}
|
|
1339
1352
|
|
|
1340
1353
|
// pragma MARK: std::vector<ObjectTypeIdentifier>
|
|
@@ -1342,11 +1355,25 @@ namespace margelo::nitro::healthkit::bridge::swift {
|
|
|
1342
1355
|
* Specialized version of `std::vector<ObjectTypeIdentifier>`.
|
|
1343
1356
|
*/
|
|
1344
1357
|
using std__vector_ObjectTypeIdentifier_ = std::vector<ObjectTypeIdentifier>;
|
|
1345
|
-
inline std::vector<ObjectTypeIdentifier>
|
|
1346
|
-
|
|
1358
|
+
inline std::vector<ObjectTypeIdentifier> create_std__vector_ObjectTypeIdentifier_(size_t size) noexcept {
|
|
1359
|
+
std::vector<ObjectTypeIdentifier> vector;
|
|
1360
|
+
vector.reserve(size);
|
|
1361
|
+
return vector;
|
|
1362
|
+
}
|
|
1363
|
+
|
|
1364
|
+
// pragma MARK: std::optional<std::vector<ObjectTypeIdentifier>>
|
|
1365
|
+
/**
|
|
1366
|
+
* Specialized version of `std::optional<std::vector<ObjectTypeIdentifier>>`.
|
|
1367
|
+
*/
|
|
1368
|
+
using std__optional_std__vector_ObjectTypeIdentifier__ = std::optional<std::vector<ObjectTypeIdentifier>>;
|
|
1369
|
+
inline std::optional<std::vector<ObjectTypeIdentifier>> create_std__optional_std__vector_ObjectTypeIdentifier__(const std::vector<ObjectTypeIdentifier>& value) noexcept {
|
|
1370
|
+
return std::optional<std::vector<ObjectTypeIdentifier>>(value);
|
|
1371
|
+
}
|
|
1372
|
+
inline bool has_value_std__optional_std__vector_ObjectTypeIdentifier__(const std::optional<std::vector<ObjectTypeIdentifier>>& optional) noexcept {
|
|
1373
|
+
return optional.has_value();
|
|
1347
1374
|
}
|
|
1348
|
-
inline
|
|
1349
|
-
return
|
|
1375
|
+
inline std::vector<ObjectTypeIdentifier> get_std__optional_std__vector_ObjectTypeIdentifier__(const std::optional<std::vector<ObjectTypeIdentifier>>& optional) noexcept {
|
|
1376
|
+
return *optional;
|
|
1350
1377
|
}
|
|
1351
1378
|
|
|
1352
1379
|
// pragma MARK: std::unordered_map<std::string, bool>
|
|
@@ -2055,11 +2082,10 @@ namespace margelo::nitro::healthkit::bridge::swift {
|
|
|
2055
2082
|
* Specialized version of `std::vector<StatisticsOptions>`.
|
|
2056
2083
|
*/
|
|
2057
2084
|
using std__vector_StatisticsOptions_ = std::vector<StatisticsOptions>;
|
|
2058
|
-
inline std::vector<StatisticsOptions>
|
|
2059
|
-
|
|
2060
|
-
|
|
2061
|
-
|
|
2062
|
-
return vector.data();
|
|
2085
|
+
inline std::vector<StatisticsOptions> create_std__vector_StatisticsOptions_(size_t size) noexcept {
|
|
2086
|
+
std::vector<StatisticsOptions> vector;
|
|
2087
|
+
vector.reserve(size);
|
|
2088
|
+
return vector;
|
|
2063
2089
|
}
|
|
2064
2090
|
|
|
2065
2091
|
// pragma MARK: std::optional<StatisticsQueryOptions>
|
|
@@ -2218,11 +2244,10 @@ namespace margelo::nitro::healthkit::bridge::swift {
|
|
|
2218
2244
|
* Specialized version of `std::vector<StateOfMindAssociation>`.
|
|
2219
2245
|
*/
|
|
2220
2246
|
using std__vector_StateOfMindAssociation_ = std::vector<StateOfMindAssociation>;
|
|
2221
|
-
inline std::vector<StateOfMindAssociation>
|
|
2222
|
-
|
|
2223
|
-
|
|
2224
|
-
|
|
2225
|
-
return vector.data();
|
|
2247
|
+
inline std::vector<StateOfMindAssociation> create_std__vector_StateOfMindAssociation_(size_t size) noexcept {
|
|
2248
|
+
std::vector<StateOfMindAssociation> vector;
|
|
2249
|
+
vector.reserve(size);
|
|
2250
|
+
return vector;
|
|
2226
2251
|
}
|
|
2227
2252
|
|
|
2228
2253
|
// pragma MARK: std::vector<StateOfMindLabel>
|
|
@@ -2230,11 +2255,10 @@ namespace margelo::nitro::healthkit::bridge::swift {
|
|
|
2230
2255
|
* Specialized version of `std::vector<StateOfMindLabel>`.
|
|
2231
2256
|
*/
|
|
2232
2257
|
using std__vector_StateOfMindLabel_ = std::vector<StateOfMindLabel>;
|
|
2233
|
-
inline std::vector<StateOfMindLabel>
|
|
2234
|
-
|
|
2235
|
-
|
|
2236
|
-
|
|
2237
|
-
return vector.data();
|
|
2258
|
+
inline std::vector<StateOfMindLabel> create_std__vector_StateOfMindLabel_(size_t size) noexcept {
|
|
2259
|
+
std::vector<StateOfMindLabel> vector;
|
|
2260
|
+
vector.reserve(size);
|
|
2261
|
+
return vector;
|
|
2238
2262
|
}
|
|
2239
2263
|
|
|
2240
2264
|
// pragma MARK: std::vector<StateOfMindSample>
|
|
@@ -2669,6 +2693,21 @@ namespace margelo::nitro::healthkit::bridge::swift {
|
|
|
2669
2693
|
return vector;
|
|
2670
2694
|
}
|
|
2671
2695
|
|
|
2696
|
+
// pragma MARK: std::optional<WorkoutTotals>
|
|
2697
|
+
/**
|
|
2698
|
+
* Specialized version of `std::optional<WorkoutTotals>`.
|
|
2699
|
+
*/
|
|
2700
|
+
using std__optional_WorkoutTotals_ = std::optional<WorkoutTotals>;
|
|
2701
|
+
inline std::optional<WorkoutTotals> create_std__optional_WorkoutTotals_(const WorkoutTotals& value) noexcept {
|
|
2702
|
+
return std::optional<WorkoutTotals>(value);
|
|
2703
|
+
}
|
|
2704
|
+
inline bool has_value_std__optional_WorkoutTotals_(const std::optional<WorkoutTotals>& optional) noexcept {
|
|
2705
|
+
return optional.has_value();
|
|
2706
|
+
}
|
|
2707
|
+
inline WorkoutTotals get_std__optional_WorkoutTotals_(const std::optional<WorkoutTotals>& optional) noexcept {
|
|
2708
|
+
return *optional;
|
|
2709
|
+
}
|
|
2710
|
+
|
|
2672
2711
|
// pragma MARK: std::vector<std::shared_ptr<HybridWorkoutProxySpec>>
|
|
2673
2712
|
/**
|
|
2674
2713
|
* Specialized version of `std::vector<std::shared_ptr<HybridWorkoutProxySpec>>`.
|
|
@@ -8,8 +8,8 @@
|
|
|
8
8
|
#pragma once
|
|
9
9
|
|
|
10
10
|
// Forward declarations of C++ defined types
|
|
11
|
-
// Forward declaration of `
|
|
12
|
-
namespace
|
|
11
|
+
// Forward declaration of `AuthDataTypes` to properly resolve imports.
|
|
12
|
+
namespace margelo::nitro::healthkit { struct AuthDataTypes; }
|
|
13
13
|
// Forward declaration of `AuthorizationRequestStatus` to properly resolve imports.
|
|
14
14
|
namespace margelo::nitro::healthkit { enum class AuthorizationRequestStatus; }
|
|
15
15
|
// Forward declaration of `AuthorizationStatus` to properly resolve imports.
|
|
@@ -194,6 +194,7 @@ namespace margelo::nitro::healthkit { enum class WorkoutSessionLocationType; }
|
|
|
194
194
|
namespace margelo::nitro::healthkit { struct WorkoutTotals; }
|
|
195
195
|
|
|
196
196
|
// Include C++ defined types
|
|
197
|
+
#include "AuthDataTypes.hpp"
|
|
197
198
|
#include "AuthorizationRequestStatus.hpp"
|
|
198
199
|
#include "AuthorizationStatus.hpp"
|
|
199
200
|
#include "BiologicalSex.hpp"
|
|
@@ -14,8 +14,6 @@ namespace ReactNativeHealthkit { class HybridCategoryTypeModuleSpec_cxx; }
|
|
|
14
14
|
|
|
15
15
|
// Forward declaration of `CategoryTypeIdentifier` to properly resolve imports.
|
|
16
16
|
namespace margelo::nitro::healthkit { enum class CategoryTypeIdentifier; }
|
|
17
|
-
// Forward declaration of `AnyMap` to properly resolve imports.
|
|
18
|
-
namespace NitroModules { class AnyMap; }
|
|
19
17
|
// Forward declaration of `CategorySample` to properly resolve imports.
|
|
20
18
|
namespace margelo::nitro::healthkit { struct CategorySample; }
|
|
21
19
|
// Forward declaration of `Device` to properly resolve imports.
|
|
@@ -112,6 +110,9 @@ namespace margelo::nitro::healthkit {
|
|
|
112
110
|
void dispose() noexcept override {
|
|
113
111
|
_swiftPart.dispose();
|
|
114
112
|
}
|
|
113
|
+
std::string toString() override {
|
|
114
|
+
return _swiftPart.toString();
|
|
115
|
+
}
|
|
115
116
|
|
|
116
117
|
public:
|
|
117
118
|
// Properties
|
|
@@ -30,6 +30,8 @@ namespace margelo::nitro::healthkit { struct OnChangeCallbackArgs; }
|
|
|
30
30
|
namespace margelo::nitro::healthkit { enum class AuthorizationStatus; }
|
|
31
31
|
// Forward declaration of `AuthorizationRequestStatus` to properly resolve imports.
|
|
32
32
|
namespace margelo::nitro::healthkit { enum class AuthorizationRequestStatus; }
|
|
33
|
+
// Forward declaration of `AuthDataTypes` to properly resolve imports.
|
|
34
|
+
namespace margelo::nitro::healthkit { struct AuthDataTypes; }
|
|
33
35
|
// Forward declaration of `SampleTypeIdentifierWriteable` to properly resolve imports.
|
|
34
36
|
namespace margelo::nitro::healthkit { enum class SampleTypeIdentifierWriteable; }
|
|
35
37
|
// Forward declaration of `PredicateWithUUID` to properly resolve imports.
|
|
@@ -66,6 +68,7 @@ namespace margelo::nitro::healthkit { class HybridWorkoutProxySpec; }
|
|
|
66
68
|
#include <functional>
|
|
67
69
|
#include "AuthorizationStatus.hpp"
|
|
68
70
|
#include "AuthorizationRequestStatus.hpp"
|
|
71
|
+
#include "AuthDataTypes.hpp"
|
|
69
72
|
#include "SampleTypeIdentifierWriteable.hpp"
|
|
70
73
|
#include "PredicateWithUUID.hpp"
|
|
71
74
|
#include "PredicateWithUUIDs.hpp"
|
|
@@ -114,6 +117,9 @@ namespace margelo::nitro::healthkit {
|
|
|
114
117
|
void dispose() noexcept override {
|
|
115
118
|
_swiftPart.dispose();
|
|
116
119
|
}
|
|
120
|
+
std::string toString() override {
|
|
121
|
+
return _swiftPart.toString();
|
|
122
|
+
}
|
|
117
123
|
|
|
118
124
|
public:
|
|
119
125
|
// Properties
|
|
@@ -241,16 +247,16 @@ namespace margelo::nitro::healthkit {
|
|
|
241
247
|
auto __value = std::move(__result.value());
|
|
242
248
|
return __value;
|
|
243
249
|
}
|
|
244
|
-
inline std::shared_ptr<Promise<AuthorizationRequestStatus>> getRequestStatusForAuthorization(const
|
|
245
|
-
auto __result = _swiftPart.getRequestStatusForAuthorization(
|
|
250
|
+
inline std::shared_ptr<Promise<AuthorizationRequestStatus>> getRequestStatusForAuthorization(const AuthDataTypes& toCheck) override {
|
|
251
|
+
auto __result = _swiftPart.getRequestStatusForAuthorization(std::forward<decltype(toCheck)>(toCheck));
|
|
246
252
|
if (__result.hasError()) [[unlikely]] {
|
|
247
253
|
std::rethrow_exception(__result.error());
|
|
248
254
|
}
|
|
249
255
|
auto __value = std::move(__result.value());
|
|
250
256
|
return __value;
|
|
251
257
|
}
|
|
252
|
-
inline std::shared_ptr<Promise<bool>> requestAuthorization(const
|
|
253
|
-
auto __result = _swiftPart.requestAuthorization(
|
|
258
|
+
inline std::shared_ptr<Promise<bool>> requestAuthorization(const AuthDataTypes& toRequest) override {
|
|
259
|
+
auto __result = _swiftPart.requestAuthorization(std::forward<decltype(toRequest)>(toRequest));
|
|
254
260
|
if (__result.hasError()) [[unlikely]] {
|
|
255
261
|
std::rethrow_exception(__result.error());
|
|
256
262
|
}
|
|
@@ -20,8 +20,6 @@ namespace margelo::nitro::healthkit { struct CategorySampleForSaving; }
|
|
|
20
20
|
namespace margelo::nitro::healthkit { struct QuantitySampleForSaving; }
|
|
21
21
|
// Forward declaration of `CategoryTypeIdentifier` to properly resolve imports.
|
|
22
22
|
namespace margelo::nitro::healthkit { enum class CategoryTypeIdentifier; }
|
|
23
|
-
// Forward declaration of `AnyMap` to properly resolve imports.
|
|
24
|
-
namespace NitroModules { class AnyMap; }
|
|
25
23
|
// Forward declaration of `SourceRevision` to properly resolve imports.
|
|
26
24
|
namespace margelo::nitro::healthkit { struct SourceRevision; }
|
|
27
25
|
// Forward declaration of `HybridSourceProxySpec` to properly resolve imports.
|
|
@@ -91,6 +89,9 @@ namespace margelo::nitro::healthkit {
|
|
|
91
89
|
void dispose() noexcept override {
|
|
92
90
|
_swiftPart.dispose();
|
|
93
91
|
}
|
|
92
|
+
std::string toString() override {
|
|
93
|
+
return _swiftPart.toString();
|
|
94
|
+
}
|
|
94
95
|
|
|
95
96
|
public:
|
|
96
97
|
// Properties
|
|
@@ -24,8 +24,6 @@ namespace margelo::nitro::healthkit { enum class ElectrocardiogramSymptomsStatus
|
|
|
24
24
|
namespace margelo::nitro::healthkit { struct ElectrocardiogramVoltage; }
|
|
25
25
|
// Forward declaration of `ElectrocardiogramLead` to properly resolve imports.
|
|
26
26
|
namespace margelo::nitro::healthkit { enum class ElectrocardiogramLead; }
|
|
27
|
-
// Forward declaration of `AnyMap` to properly resolve imports.
|
|
28
|
-
namespace NitroModules { class AnyMap; }
|
|
29
27
|
// Forward declaration of `SourceRevision` to properly resolve imports.
|
|
30
28
|
namespace margelo::nitro::healthkit { struct SourceRevision; }
|
|
31
29
|
// Forward declaration of `HybridSourceProxySpec` to properly resolve imports.
|
|
@@ -121,6 +119,9 @@ namespace margelo::nitro::healthkit {
|
|
|
121
119
|
void dispose() noexcept override {
|
|
122
120
|
_swiftPart.dispose();
|
|
123
121
|
}
|
|
122
|
+
std::string toString() override {
|
|
123
|
+
return _swiftPart.toString();
|
|
124
|
+
}
|
|
124
125
|
|
|
125
126
|
public:
|
|
126
127
|
// Properties
|
|
@@ -18,8 +18,6 @@ namespace margelo::nitro::healthkit { struct HeartbeatSeriesSample; }
|
|
|
18
18
|
namespace margelo::nitro::healthkit { struct Device; }
|
|
19
19
|
// Forward declaration of `Heartbeat` to properly resolve imports.
|
|
20
20
|
namespace margelo::nitro::healthkit { struct Heartbeat; }
|
|
21
|
-
// Forward declaration of `AnyMap` to properly resolve imports.
|
|
22
|
-
namespace NitroModules { class AnyMap; }
|
|
23
21
|
// Forward declaration of `SourceRevision` to properly resolve imports.
|
|
24
22
|
namespace margelo::nitro::healthkit { struct SourceRevision; }
|
|
25
23
|
// Forward declaration of `HybridSourceProxySpec` to properly resolve imports.
|
|
@@ -112,6 +110,9 @@ namespace margelo::nitro::healthkit {
|
|
|
112
110
|
void dispose() noexcept override {
|
|
113
111
|
_swiftPart.dispose();
|
|
114
112
|
}
|
|
113
|
+
std::string toString() override {
|
|
114
|
+
return _swiftPart.toString();
|
|
115
|
+
}
|
|
115
116
|
|
|
116
117
|
public:
|
|
117
118
|
// Properties
|
|
@@ -14,8 +14,6 @@ namespace ReactNativeHealthkit { class HybridQuantityTypeModuleSpec_cxx; }
|
|
|
14
14
|
|
|
15
15
|
// Forward declaration of `QuantityTypeIdentifier` to properly resolve imports.
|
|
16
16
|
namespace margelo::nitro::healthkit { enum class QuantityTypeIdentifier; }
|
|
17
|
-
// Forward declaration of `AnyMap` to properly resolve imports.
|
|
18
|
-
namespace NitroModules { class AnyMap; }
|
|
19
17
|
// Forward declaration of `PredicateWithUUID` to properly resolve imports.
|
|
20
18
|
namespace margelo::nitro::healthkit { struct PredicateWithUUID; }
|
|
21
19
|
// Forward declaration of `PredicateWithUUIDs` to properly resolve imports.
|
|
@@ -130,6 +128,9 @@ namespace margelo::nitro::healthkit {
|
|
|
130
128
|
void dispose() noexcept override {
|
|
131
129
|
_swiftPart.dispose();
|
|
132
130
|
}
|
|
131
|
+
std::string toString() override {
|
|
132
|
+
return _swiftPart.toString();
|
|
133
|
+
}
|
|
133
134
|
|
|
134
135
|
public:
|
|
135
136
|
// Properties
|
|
@@ -177,7 +178,7 @@ namespace margelo::nitro::healthkit {
|
|
|
177
178
|
auto __value = std::move(__result.value());
|
|
178
179
|
return __value;
|
|
179
180
|
}
|
|
180
|
-
inline std::shared_ptr<Promise<std::vector<QueryStatisticsResponse>>> queryStatisticsCollectionForQuantity(QuantityTypeIdentifier identifier, const std::vector<StatisticsOptions>& statistics,
|
|
181
|
+
inline std::shared_ptr<Promise<std::vector<QueryStatisticsResponse>>> queryStatisticsCollectionForQuantity(QuantityTypeIdentifier identifier, const std::vector<StatisticsOptions>& statistics, std::chrono::system_clock::time_point anchorDate, const IntervalComponents& intervalComponents, const std::optional<StatisticsQueryOptions>& options) override {
|
|
181
182
|
auto __result = _swiftPart.queryStatisticsCollectionForQuantity(static_cast<int>(identifier), statistics, anchorDate, std::forward<decltype(intervalComponents)>(intervalComponents), options);
|
|
182
183
|
if (__result.hasError()) [[unlikely]] {
|
|
183
184
|
std::rethrow_exception(__result.error());
|
|
@@ -16,8 +16,6 @@ namespace ReactNativeHealthkit { class HybridStateOfMindModuleSpec_cxx; }
|
|
|
16
16
|
namespace margelo::nitro::healthkit { struct StateOfMindSample; }
|
|
17
17
|
// Forward declaration of `Device` to properly resolve imports.
|
|
18
18
|
namespace margelo::nitro::healthkit { struct Device; }
|
|
19
|
-
// Forward declaration of `AnyMap` to properly resolve imports.
|
|
20
|
-
namespace NitroModules { class AnyMap; }
|
|
21
19
|
// Forward declaration of `SourceRevision` to properly resolve imports.
|
|
22
20
|
namespace margelo::nitro::healthkit { struct SourceRevision; }
|
|
23
21
|
// Forward declaration of `HybridSourceProxySpec` to properly resolve imports.
|
|
@@ -112,6 +110,9 @@ namespace margelo::nitro::healthkit {
|
|
|
112
110
|
void dispose() noexcept override {
|
|
113
111
|
_swiftPart.dispose();
|
|
114
112
|
}
|
|
113
|
+
std::string toString() override {
|
|
114
|
+
return _swiftPart.toString();
|
|
115
|
+
}
|
|
115
116
|
|
|
116
117
|
public:
|
|
117
118
|
// Properties
|
|
@@ -12,14 +12,12 @@
|
|
|
12
12
|
// Forward declaration of `HybridWorkoutProxySpec_cxx` to properly resolve imports.
|
|
13
13
|
namespace ReactNativeHealthkit { class HybridWorkoutProxySpec_cxx; }
|
|
14
14
|
|
|
15
|
-
// Forward declaration of `Quantity` to properly resolve imports.
|
|
16
|
-
namespace margelo::nitro::healthkit { struct Quantity; }
|
|
17
15
|
// Forward declaration of `Device` to properly resolve imports.
|
|
18
16
|
namespace margelo::nitro::healthkit { struct Device; }
|
|
19
17
|
// Forward declaration of `WorkoutActivityType` to properly resolve imports.
|
|
20
18
|
namespace margelo::nitro::healthkit { enum class WorkoutActivityType; }
|
|
21
|
-
// Forward declaration of `
|
|
22
|
-
namespace
|
|
19
|
+
// Forward declaration of `Quantity` to properly resolve imports.
|
|
20
|
+
namespace margelo::nitro::healthkit { struct Quantity; }
|
|
23
21
|
// Forward declaration of `SourceRevision` to properly resolve imports.
|
|
24
22
|
namespace margelo::nitro::healthkit { struct SourceRevision; }
|
|
25
23
|
// Forward declaration of `HybridSourceProxySpec` to properly resolve imports.
|
|
@@ -47,11 +45,11 @@ namespace margelo::nitro::healthkit { struct QuantityDateInterval; }
|
|
|
47
45
|
// Forward declaration of `QuantityTypeIdentifier` to properly resolve imports.
|
|
48
46
|
namespace margelo::nitro::healthkit { enum class QuantityTypeIdentifier; }
|
|
49
47
|
|
|
50
|
-
#include "Quantity.hpp"
|
|
51
|
-
#include <optional>
|
|
52
48
|
#include <string>
|
|
53
49
|
#include "Device.hpp"
|
|
50
|
+
#include <optional>
|
|
54
51
|
#include "WorkoutActivityType.hpp"
|
|
52
|
+
#include "Quantity.hpp"
|
|
55
53
|
#include <chrono>
|
|
56
54
|
#include <NitroModules/AnyMap.hpp>
|
|
57
55
|
#include "SourceRevision.hpp"
|
|
@@ -106,25 +104,12 @@ namespace margelo::nitro::healthkit {
|
|
|
106
104
|
void dispose() noexcept override {
|
|
107
105
|
_swiftPart.dispose();
|
|
108
106
|
}
|
|
107
|
+
std::string toString() override {
|
|
108
|
+
return _swiftPart.toString();
|
|
109
|
+
}
|
|
109
110
|
|
|
110
111
|
public:
|
|
111
112
|
// Properties
|
|
112
|
-
inline std::optional<Quantity> getTotalDistance() noexcept override {
|
|
113
|
-
auto __result = _swiftPart.getTotalDistance();
|
|
114
|
-
return __result;
|
|
115
|
-
}
|
|
116
|
-
inline std::optional<Quantity> getTotalEnergyBurned() noexcept override {
|
|
117
|
-
auto __result = _swiftPart.getTotalEnergyBurned();
|
|
118
|
-
return __result;
|
|
119
|
-
}
|
|
120
|
-
inline std::optional<Quantity> getTotalSwimmingStrokeCount() noexcept override {
|
|
121
|
-
auto __result = _swiftPart.getTotalSwimmingStrokeCount();
|
|
122
|
-
return __result;
|
|
123
|
-
}
|
|
124
|
-
inline std::optional<Quantity> getTotalFlightsClimbed() noexcept override {
|
|
125
|
-
auto __result = _swiftPart.getTotalFlightsClimbed();
|
|
126
|
-
return __result;
|
|
127
|
-
}
|
|
128
113
|
inline std::string getUuid() noexcept override {
|
|
129
114
|
auto __result = _swiftPart.getUuid();
|
|
130
115
|
return __result;
|
|
@@ -20,8 +20,6 @@ namespace margelo::nitro::healthkit { enum class WorkoutActivityType; }
|
|
|
20
20
|
namespace margelo::nitro::healthkit { struct QuantitySampleForSaving; }
|
|
21
21
|
// Forward declaration of `QuantityTypeIdentifier` to properly resolve imports.
|
|
22
22
|
namespace margelo::nitro::healthkit { enum class QuantityTypeIdentifier; }
|
|
23
|
-
// Forward declaration of `AnyMap` to properly resolve imports.
|
|
24
|
-
namespace NitroModules { class AnyMap; }
|
|
25
23
|
// Forward declaration of `SourceRevision` to properly resolve imports.
|
|
26
24
|
namespace margelo::nitro::healthkit { struct SourceRevision; }
|
|
27
25
|
// Forward declaration of `HybridSourceProxySpec` to properly resolve imports.
|
|
@@ -130,6 +128,9 @@ namespace margelo::nitro::healthkit {
|
|
|
130
128
|
void dispose() noexcept override {
|
|
131
129
|
_swiftPart.dispose();
|
|
132
130
|
}
|
|
131
|
+
std::string toString() override {
|
|
132
|
+
return _swiftPart.toString();
|
|
133
|
+
}
|
|
133
134
|
|
|
134
135
|
public:
|
|
135
136
|
// Properties
|
|
@@ -137,8 +138,8 @@ namespace margelo::nitro::healthkit {
|
|
|
137
138
|
|
|
138
139
|
public:
|
|
139
140
|
// Methods
|
|
140
|
-
inline std::shared_ptr<Promise<std::shared_ptr<HybridWorkoutProxySpec>>> saveWorkoutSample(WorkoutActivityType workoutActivityType, const std::vector<QuantitySampleForSaving>& quantities, std::chrono::system_clock::time_point startDate, std::chrono::system_clock::time_point endDate, const WorkoutTotals
|
|
141
|
-
auto __result = _swiftPart.saveWorkoutSample(static_cast<int>(workoutActivityType), quantities, startDate, endDate,
|
|
141
|
+
inline std::shared_ptr<Promise<std::shared_ptr<HybridWorkoutProxySpec>>> saveWorkoutSample(WorkoutActivityType workoutActivityType, const std::vector<QuantitySampleForSaving>& quantities, std::chrono::system_clock::time_point startDate, std::chrono::system_clock::time_point endDate, const std::optional<WorkoutTotals>& totals, const std::optional<std::shared_ptr<AnyMap>>& metadata) override {
|
|
142
|
+
auto __result = _swiftPart.saveWorkoutSample(static_cast<int>(workoutActivityType), quantities, startDate, endDate, totals, metadata);
|
|
142
143
|
if (__result.hasError()) [[unlikely]] {
|
|
143
144
|
std::rethrow_exception(__result.error());
|
|
144
145
|
}
|