@kingstinct/react-native-healthkit 13.3.1 → 14.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/ReactNativeHealthkit.podspec +1 -0
- package/app.plugin.ts +40 -2
- package/ios/BackgroundDeliveryManager.swift +196 -0
- package/ios/CategoryTypeModule.swift +1 -1
- package/ios/CoreModule.swift +24 -0
- package/ios/CorrelationTypeModule.swift +2 -35
- package/ios/ElectrocardiogramModule.swift +2 -34
- package/ios/HeartbeatSeriesModule.swift +2 -34
- package/ios/MedicationModule.swift +3 -35
- package/ios/PredicateHelpers.swift +2 -2
- package/ios/QuantityTypeModule.swift +11 -11
- package/ios/Serializers.swift +58 -90
- package/ios/StateOfMindModule.swift +2 -34
- package/ios/WorkoutProxy.swift +4 -149
- package/ios/generated/HealthkitGenerated.swift +52 -0
- package/lib/commonjs/generated/healthkit.generated.js +745 -0
- package/lib/commonjs/healthkit.ios.js +51 -17
- package/lib/commonjs/healthkit.js +120 -34
- package/lib/commonjs/specs/QuantityTypeModule.nitro.js +1 -0
- package/lib/commonjs/type-tests/generated-typing.js +2 -0
- package/lib/commonjs/types/CategoryType.js +19 -99
- package/lib/commonjs/types/Medication.js +2 -0
- package/lib/commonjs/types/MetadataEnums.js +17 -0
- package/lib/commonjs/types/QuantityType.js +4 -15
- package/lib/commonjs/types/WeatherCondition.js +2 -32
- package/lib/commonjs/types/Workouts.js +3 -98
- package/lib/commonjs/types/index.js +2 -0
- package/lib/module/generated/healthkit.generated.js +742 -0
- package/lib/module/healthkit.ios.js +49 -15
- package/lib/module/healthkit.js +94 -20
- package/lib/module/specs/QuantityTypeModule.nitro.js +1 -0
- package/lib/module/type-tests/generated-typing.js +1 -0
- package/lib/module/types/CategoryType.js +2 -98
- package/lib/module/types/Medication.js +1 -0
- package/lib/module/types/MetadataEnums.js +1 -0
- package/lib/module/types/QuantityType.js +2 -14
- package/lib/module/types/WeatherCondition.js +1 -32
- package/lib/module/types/Workouts.js +2 -98
- package/lib/module/types/index.js +2 -0
- package/lib/typescript/generated/healthkit.generated.d.ts +1006 -0
- package/lib/typescript/healthkit.d.ts +39 -36
- package/lib/typescript/healthkit.ios.d.ts +64 -53
- package/lib/typescript/hooks/useMostRecentQuantitySample.d.ts +3 -2
- package/lib/typescript/hooks/useMostRecentWorkout.d.ts +2 -2
- package/lib/typescript/hooks/useQuantitySampleById.d.ts +5 -4
- package/lib/typescript/hooks/useStatisticsForQuantity.d.ts +2 -2
- package/lib/typescript/hooks/useSubscribeToQuantitySamples.d.ts +1 -1
- package/lib/typescript/modules.d.ts +2 -2
- package/lib/typescript/specs/CategoryTypeModule.nitro.d.ts +3 -3
- package/lib/typescript/specs/CoreModule.nitro.d.ts +15 -0
- package/lib/typescript/specs/QuantityTypeModule.nitro.d.ts +20 -9
- package/lib/typescript/type-tests/generated-typing.d.ts +1 -0
- package/lib/typescript/types/CategoryType.d.ts +10 -104
- package/lib/typescript/types/CategoryTypeIdentifier.d.ts +1 -61
- package/lib/typescript/types/CorrelationType.d.ts +8 -2
- package/lib/typescript/types/ElectrocardiogramSample.d.ts +8 -1
- package/lib/typescript/types/HeartbeatSeries.d.ts +8 -1
- package/lib/typescript/types/InterfaceVerification.d.ts +14 -1
- package/lib/typescript/types/Medication.d.ts +10 -0
- package/lib/typescript/types/MetadataEnums.d.ts +1 -0
- package/lib/typescript/types/QuantitySample.d.ts +9 -1
- package/lib/typescript/types/QuantityType.d.ts +14 -18
- package/lib/typescript/types/QuantityTypeIdentifier.d.ts +1 -671
- package/lib/typescript/types/QueryOptions.d.ts +8 -4
- package/lib/typescript/types/Shared.d.ts +12 -41
- package/lib/typescript/types/StateOfMind.d.ts +8 -1
- package/lib/typescript/types/Subscriptions.d.ts +11 -11
- package/lib/typescript/types/WeatherCondition.d.ts +1 -30
- package/lib/typescript/types/Workouts.d.ts +20 -104
- package/lib/typescript/types/index.d.ts +2 -0
- package/lib/typescript/utils/getMostRecentQuantitySample.d.ts +2 -1
- package/lib/typescript/utils/getMostRecentWorkout.d.ts +2 -1
- package/lib/typescript/utils/getPreferredUnit.d.ts +2 -1
- package/lib/typescript/utils/getQuantitySampleById.d.ts +2 -1
- package/lib/typescript/utils/subscribeToQuantitySamples.d.ts +1 -1
- package/nitrogen/generated/ios/ReactNativeHealthkit-Swift-Cxx-Bridge.hpp +55 -109
- package/nitrogen/generated/ios/ReactNativeHealthkit-Swift-Cxx-Umbrella.hpp +12 -18
- package/nitrogen/generated/ios/c++/HybridCategoryTypeModuleSpecSwift.hpp +5 -14
- package/nitrogen/generated/ios/c++/HybridCoreModuleSpecSwift.hpp +18 -2
- package/nitrogen/generated/ios/c++/HybridCorrelationTypeModuleSpecSwift.hpp +1 -13
- package/nitrogen/generated/ios/c++/HybridElectrocardiogramModuleSpecSwift.hpp +1 -13
- package/nitrogen/generated/ios/c++/HybridHeartbeatSeriesModuleSpecSwift.hpp +2 -14
- package/nitrogen/generated/ios/c++/HybridMedicationModuleSpecSwift.hpp +1 -13
- package/nitrogen/generated/ios/c++/HybridQuantityTypeModuleSpecSwift.hpp +19 -28
- package/nitrogen/generated/ios/c++/HybridStateOfMindModuleSpecSwift.hpp +2 -14
- package/nitrogen/generated/ios/c++/HybridWorkoutProxySpecSwift.hpp +3 -116
- package/nitrogen/generated/ios/swift/CategorySample.swift +4 -329
- package/nitrogen/generated/ios/swift/CategoryTypeIdentifier.swift +112 -108
- package/nitrogen/generated/ios/swift/CategoryTypeIdentifierWriteable.swift +292 -0
- package/nitrogen/generated/ios/swift/CorrelationSample.swift +4 -347
- package/nitrogen/generated/ios/swift/ElectrocardiogramSample.swift +4 -329
- package/nitrogen/generated/ios/swift/FilterForWorkouts.swift +30 -30
- package/nitrogen/generated/ios/swift/FilterForWorkoutsBase.swift +30 -30
- package/nitrogen/generated/ios/swift/GeneralForm.swift +4 -4
- package/nitrogen/generated/ios/swift/HeartbeatSeriesSample.swift +4 -329
- package/nitrogen/generated/ios/swift/HybridCategoryTypeModuleSpec.swift +1 -1
- package/nitrogen/generated/ios/swift/HybridCategoryTypeModuleSpec_cxx.swift +1 -1
- package/nitrogen/generated/ios/swift/HybridCoreModuleSpec.swift +2 -0
- package/nitrogen/generated/ios/swift/HybridCoreModuleSpec_cxx.swift +38 -0
- package/nitrogen/generated/ios/swift/HybridQuantityTypeModuleSpec.swift +6 -6
- package/nitrogen/generated/ios/swift/HybridQuantityTypeModuleSpec_cxx.swift +6 -6
- package/nitrogen/generated/ios/swift/HybridWorkoutProxySpec.swift +1 -27
- package/nitrogen/generated/ios/swift/HybridWorkoutProxySpec_cxx.swift +2 -340
- package/nitrogen/generated/ios/swift/MedicationDoseEvent.swift +4 -329
- package/nitrogen/generated/ios/swift/ObjectTypeIdentifier.swift +492 -492
- package/nitrogen/generated/ios/swift/QuantitySample.swift +4 -329
- package/nitrogen/generated/ios/swift/QuantityTypeIdentifier.swift +380 -384
- package/nitrogen/generated/ios/swift/QuantityTypeIdentifierWriteable.swift +372 -376
- package/nitrogen/generated/ios/swift/{QueryOptionsWithAnchorAndUnit.swift → QueryOptionsWithAnchorAndStringUnit.swift} +5 -5
- package/nitrogen/generated/ios/swift/{QueryOptionsWithSortOrderAndUnit.swift → QueryOptionsWithSortOrderAndStringUnit.swift} +5 -5
- package/nitrogen/generated/ios/swift/QueryStatisticsResponseFromSingleSource.swift +37 -37
- package/nitrogen/generated/ios/swift/SampleTypeIdentifier.swift +492 -492
- package/nitrogen/generated/ios/swift/SampleTypeIdentifierWriteable.swift +482 -486
- package/nitrogen/generated/ios/swift/StateOfMindSample.swift +4 -329
- package/nitrogen/generated/ios/swift/{StatisticsQueryOptions.swift → StatisticsQueryOptionsWithStringUnit.swift} +5 -5
- package/nitrogen/generated/ios/swift/WorkoutEvent.swift +20 -2
- package/nitrogen/generated/ios/swift/WorkoutSample.swift +4 -402
- package/nitrogen/generated/shared/c++/CategorySample.hpp +8 -100
- package/nitrogen/generated/shared/c++/CategoryTypeIdentifier.hpp +153 -149
- package/nitrogen/generated/shared/c++/CategoryTypeIdentifierWriteable.hpp +328 -0
- package/nitrogen/generated/shared/c++/CorrelationSample.hpp +9 -105
- package/nitrogen/generated/shared/c++/ElectrocardiogramSample.hpp +7 -99
- package/nitrogen/generated/shared/c++/FilterForWorkouts.hpp +13 -13
- package/nitrogen/generated/shared/c++/FilterForWorkoutsBase.hpp +13 -13
- package/nitrogen/generated/shared/c++/GeneralForm.hpp +7 -7
- package/nitrogen/generated/shared/c++/HeartbeatSeriesSample.hpp +8 -100
- package/nitrogen/generated/shared/c++/HybridCategoryTypeModuleSpec.hpp +5 -2
- package/nitrogen/generated/shared/c++/HybridCoreModuleSpec.cpp +2 -0
- package/nitrogen/generated/shared/c++/HybridCoreModuleSpec.hpp +4 -2
- package/nitrogen/generated/shared/c++/HybridQuantityTypeModuleSpec.hpp +15 -15
- package/nitrogen/generated/shared/c++/HybridWorkoutProxySpec.cpp +1 -27
- package/nitrogen/generated/shared/c++/HybridWorkoutProxySpec.hpp +2 -37
- package/nitrogen/generated/shared/c++/MedicationDoseEvent.hpp +7 -99
- package/nitrogen/generated/shared/c++/ObjectTypeIdentifier.hpp +565 -565
- package/nitrogen/generated/shared/c++/QuantitySample.hpp +8 -100
- package/nitrogen/generated/shared/c++/QuantityTypeIdentifier.hpp +407 -411
- package/nitrogen/generated/shared/c++/QuantityTypeIdentifierWriteable.hpp +398 -402
- package/nitrogen/generated/shared/c++/{QueryOptionsWithAnchorAndUnit.hpp → QueryOptionsWithAnchorAndStringUnit.hpp} +11 -11
- package/nitrogen/generated/shared/c++/{QueryOptionsWithSortOrderAndUnit.hpp → QueryOptionsWithSortOrderAndStringUnit.hpp} +11 -11
- package/nitrogen/generated/shared/c++/QueryStatisticsResponseFromSingleSource.hpp +12 -12
- package/nitrogen/generated/shared/c++/SampleTypeIdentifier.hpp +559 -559
- package/nitrogen/generated/shared/c++/SampleTypeIdentifierWriteable.hpp +541 -545
- package/nitrogen/generated/shared/c++/StateOfMindSample.hpp +8 -100
- package/nitrogen/generated/shared/c++/{StatisticsQueryOptions.hpp → StatisticsQueryOptionsWithStringUnit.hpp} +11 -11
- package/nitrogen/generated/shared/c++/WorkoutEvent.hpp +8 -2
- package/nitrogen/generated/shared/c++/WorkoutSample.hpp +7 -120
- package/package.json +5 -2
- package/src/generated/healthkit-schema.json +3680 -0
- package/src/generated/healthkit.generated.ts +1307 -0
- package/src/healthkit.ios.ts +225 -19
- package/src/healthkit.ts +181 -55
- package/src/hooks/useMostRecentQuantitySample.ts +6 -5
- package/src/hooks/useMostRecentWorkout.ts +2 -2
- package/src/hooks/useQuantitySampleById.ts +6 -5
- package/src/hooks/useStatisticsForQuantity.ts +2 -1
- package/src/hooks/useSubscribeToQuantitySamples.ts +1 -1
- package/src/modules.ts +7 -2
- package/src/specs/CategoryTypeModule.nitro.ts +8 -5
- package/src/specs/CoreModule.nitro.ts +20 -0
- package/src/specs/QuantityTypeModule.nitro.ts +81 -7
- package/src/test-setup.ts +2 -0
- package/src/type-tests/generated-typing.ts +133 -0
- package/src/types/CategoryType.ts +52 -148
- package/src/types/CategoryTypeIdentifier.ts +5 -134
- package/src/types/CorrelationType.ts +13 -3
- package/src/types/ElectrocardiogramSample.ts +13 -1
- package/src/types/HeartbeatSeries.ts +13 -1
- package/src/types/InterfaceVerification.ts +38 -1
- package/src/types/Medication.ts +19 -0
- package/src/types/MetadataEnums.ts +15 -0
- package/src/types/QuantitySample.ts +14 -2
- package/src/types/QuantityType.ts +22 -122
- package/src/types/QuantityTypeIdentifier.ts +5 -772
- package/src/types/QueryOptions.ts +11 -4
- package/src/types/Shared.ts +22 -49
- package/src/types/StateOfMind.ts +13 -1
- package/src/types/Subscriptions.ts +19 -13
- package/src/types/WeatherCondition.ts +1 -31
- package/src/types/Workouts.ts +46 -108
- package/src/types/index.ts +2 -0
- package/src/utils/getMostRecentQuantitySample.ts +4 -3
- package/src/utils/getMostRecentWorkout.ts +5 -2
- package/src/utils/getPreferredUnit.ts +5 -4
- package/src/utils/getQuantitySampleById.ts +4 -3
- package/src/utils/subscribeToQuantitySamples.ts +5 -3
- package/nitrogen/generated/ios/swift/HeartRateMotionContext.swift +0 -44
- package/nitrogen/generated/ios/swift/InsulinDeliveryReason.swift +0 -40
- package/nitrogen/generated/ios/swift/WeatherCondition.swift +0 -144
- package/nitrogen/generated/shared/c++/HeartRateMotionContext.hpp +0 -67
- package/nitrogen/generated/shared/c++/InsulinDeliveryReason.hpp +0 -62
- package/nitrogen/generated/shared/c++/WeatherCondition.hpp +0 -88
|
@@ -24,12 +24,6 @@ namespace margelo::nitro::healthkit { enum class WorkoutEventType; }
|
|
|
24
24
|
namespace margelo::nitro::healthkit { struct WorkoutActivity; }
|
|
25
25
|
// Forward declaration of `SampleType` to properly resolve imports.
|
|
26
26
|
namespace margelo::nitro::healthkit { struct SampleType; }
|
|
27
|
-
// Forward declaration of `WeatherCondition` to properly resolve imports.
|
|
28
|
-
namespace margelo::nitro::healthkit { enum class WeatherCondition; }
|
|
29
|
-
// Forward declaration of `InsulinDeliveryReason` to properly resolve imports.
|
|
30
|
-
namespace margelo::nitro::healthkit { enum class InsulinDeliveryReason; }
|
|
31
|
-
// Forward declaration of `HeartRateMotionContext` to properly resolve imports.
|
|
32
|
-
namespace margelo::nitro::healthkit { enum class HeartRateMotionContext; }
|
|
33
27
|
// Forward declaration of `SourceRevision` to properly resolve imports.
|
|
34
28
|
namespace margelo::nitro::healthkit { struct SourceRevision; }
|
|
35
29
|
// Forward declaration of `HybridSourceProxySpec` to properly resolve imports.
|
|
@@ -61,16 +55,13 @@ namespace margelo::nitro::healthkit { enum class QuantityTypeIdentifier; }
|
|
|
61
55
|
#include <vector>
|
|
62
56
|
#include "WorkoutEventType.hpp"
|
|
63
57
|
#include <chrono>
|
|
58
|
+
#include <NitroModules/AnyMap.hpp>
|
|
64
59
|
#include "WorkoutActivity.hpp"
|
|
65
60
|
#include "SampleType.hpp"
|
|
66
|
-
#include "WeatherCondition.hpp"
|
|
67
|
-
#include "InsulinDeliveryReason.hpp"
|
|
68
|
-
#include "HeartRateMotionContext.hpp"
|
|
69
61
|
#include "SourceRevision.hpp"
|
|
70
62
|
#include <memory>
|
|
71
63
|
#include "HybridSourceProxySpec.hpp"
|
|
72
64
|
#include "Device.hpp"
|
|
73
|
-
#include <NitroModules/AnyMap.hpp>
|
|
74
65
|
#include "WorkoutSample.hpp"
|
|
75
66
|
#include <NitroModules/Promise.hpp>
|
|
76
67
|
#include "LocationForSaving.hpp"
|
|
@@ -159,28 +150,8 @@ namespace margelo::nitro::healthkit {
|
|
|
159
150
|
auto __result = _swiftPart.getActivities();
|
|
160
151
|
return __result;
|
|
161
152
|
}
|
|
162
|
-
inline std::
|
|
163
|
-
auto __result = _swiftPart.
|
|
164
|
-
return __result;
|
|
165
|
-
}
|
|
166
|
-
inline std::optional<Quantity> getMetadataElevationAscended() noexcept override {
|
|
167
|
-
auto __result = _swiftPart.getMetadataElevationAscended();
|
|
168
|
-
return __result;
|
|
169
|
-
}
|
|
170
|
-
inline std::optional<Quantity> getMetadataElevationDescended() noexcept override {
|
|
171
|
-
auto __result = _swiftPart.getMetadataElevationDescended();
|
|
172
|
-
return __result;
|
|
173
|
-
}
|
|
174
|
-
inline std::optional<bool> getMetadataIndoorWorkout() noexcept override {
|
|
175
|
-
auto __result = _swiftPart.getMetadataIndoorWorkout();
|
|
176
|
-
return __result;
|
|
177
|
-
}
|
|
178
|
-
inline std::optional<Quantity> getMetadataAverageSpeed() noexcept override {
|
|
179
|
-
auto __result = _swiftPart.getMetadataAverageSpeed();
|
|
180
|
-
return __result;
|
|
181
|
-
}
|
|
182
|
-
inline std::optional<Quantity> getMetadataMaximumSpeed() noexcept override {
|
|
183
|
-
auto __result = _swiftPart.getMetadataMaximumSpeed();
|
|
153
|
+
inline std::shared_ptr<AnyMap> getMetadata() noexcept override {
|
|
154
|
+
auto __result = _swiftPart.getMetadata();
|
|
184
155
|
return __result;
|
|
185
156
|
}
|
|
186
157
|
inline SampleType getSampleType() noexcept override {
|
|
@@ -197,26 +168,6 @@ namespace margelo::nitro::healthkit {
|
|
|
197
168
|
inline bool getHasUndeterminedDuration() noexcept override {
|
|
198
169
|
return _swiftPart.hasUndeterminedDuration();
|
|
199
170
|
}
|
|
200
|
-
inline std::optional<WeatherCondition> getMetadataWeatherCondition() noexcept override {
|
|
201
|
-
auto __result = _swiftPart.getMetadataWeatherCondition();
|
|
202
|
-
return __result;
|
|
203
|
-
}
|
|
204
|
-
inline std::optional<Quantity> getMetadataWeatherHumidity() noexcept override {
|
|
205
|
-
auto __result = _swiftPart.getMetadataWeatherHumidity();
|
|
206
|
-
return __result;
|
|
207
|
-
}
|
|
208
|
-
inline std::optional<Quantity> getMetadataWeatherTemperature() noexcept override {
|
|
209
|
-
auto __result = _swiftPart.getMetadataWeatherTemperature();
|
|
210
|
-
return __result;
|
|
211
|
-
}
|
|
212
|
-
inline std::optional<InsulinDeliveryReason> getMetadataInsulinDeliveryReason() noexcept override {
|
|
213
|
-
auto __result = _swiftPart.getMetadataInsulinDeliveryReason();
|
|
214
|
-
return __result;
|
|
215
|
-
}
|
|
216
|
-
inline std::optional<HeartRateMotionContext> getMetadataHeartRateMotionContext() noexcept override {
|
|
217
|
-
auto __result = _swiftPart.getMetadataHeartRateMotionContext();
|
|
218
|
-
return __result;
|
|
219
|
-
}
|
|
220
171
|
inline std::string getUuid() noexcept override {
|
|
221
172
|
auto __result = _swiftPart.getUuid();
|
|
222
173
|
return __result;
|
|
@@ -228,70 +179,6 @@ namespace margelo::nitro::healthkit {
|
|
|
228
179
|
auto __result = _swiftPart.getDevice();
|
|
229
180
|
return __result;
|
|
230
181
|
}
|
|
231
|
-
inline std::shared_ptr<AnyMap> getMetadata() noexcept override {
|
|
232
|
-
auto __result = _swiftPart.getMetadata();
|
|
233
|
-
return __result;
|
|
234
|
-
}
|
|
235
|
-
inline std::optional<std::string> getMetadataExternalUUID() noexcept override {
|
|
236
|
-
auto __result = _swiftPart.getMetadataExternalUUID();
|
|
237
|
-
return __result;
|
|
238
|
-
}
|
|
239
|
-
inline std::optional<std::string> getMetadataTimeZone() noexcept override {
|
|
240
|
-
auto __result = _swiftPart.getMetadataTimeZone();
|
|
241
|
-
return __result;
|
|
242
|
-
}
|
|
243
|
-
inline std::optional<bool> getMetadataWasUserEntered() noexcept override {
|
|
244
|
-
auto __result = _swiftPart.getMetadataWasUserEntered();
|
|
245
|
-
return __result;
|
|
246
|
-
}
|
|
247
|
-
inline std::optional<std::string> getMetadataDeviceSerialNumber() noexcept override {
|
|
248
|
-
auto __result = _swiftPart.getMetadataDeviceSerialNumber();
|
|
249
|
-
return __result;
|
|
250
|
-
}
|
|
251
|
-
inline std::optional<std::string> getMetadataUdiDeviceIdentifier() noexcept override {
|
|
252
|
-
auto __result = _swiftPart.getMetadataUdiDeviceIdentifier();
|
|
253
|
-
return __result;
|
|
254
|
-
}
|
|
255
|
-
inline std::optional<std::string> getMetadataUdiProductionIdentifier() noexcept override {
|
|
256
|
-
auto __result = _swiftPart.getMetadataUdiProductionIdentifier();
|
|
257
|
-
return __result;
|
|
258
|
-
}
|
|
259
|
-
inline std::optional<std::string> getMetadataDigitalSignature() noexcept override {
|
|
260
|
-
auto __result = _swiftPart.getMetadataDigitalSignature();
|
|
261
|
-
return __result;
|
|
262
|
-
}
|
|
263
|
-
inline std::optional<std::string> getMetadataDeviceName() noexcept override {
|
|
264
|
-
auto __result = _swiftPart.getMetadataDeviceName();
|
|
265
|
-
return __result;
|
|
266
|
-
}
|
|
267
|
-
inline std::optional<std::string> getMetadataDeviceManufacturerName() noexcept override {
|
|
268
|
-
auto __result = _swiftPart.getMetadataDeviceManufacturerName();
|
|
269
|
-
return __result;
|
|
270
|
-
}
|
|
271
|
-
inline std::optional<std::string> getMetadataSyncIdentifier() noexcept override {
|
|
272
|
-
auto __result = _swiftPart.getMetadataSyncIdentifier();
|
|
273
|
-
return __result;
|
|
274
|
-
}
|
|
275
|
-
inline std::optional<double> getMetadataSyncVersion() noexcept override {
|
|
276
|
-
auto __result = _swiftPart.getMetadataSyncVersion();
|
|
277
|
-
return __result;
|
|
278
|
-
}
|
|
279
|
-
inline std::optional<bool> getMetadataWasTakenInLab() noexcept override {
|
|
280
|
-
auto __result = _swiftPart.getMetadataWasTakenInLab();
|
|
281
|
-
return __result;
|
|
282
|
-
}
|
|
283
|
-
inline std::optional<double> getMetadataReferenceRangeLowerLimit() noexcept override {
|
|
284
|
-
auto __result = _swiftPart.getMetadataReferenceRangeLowerLimit();
|
|
285
|
-
return __result;
|
|
286
|
-
}
|
|
287
|
-
inline std::optional<double> getMetadataReferenceRangeUpperLimit() noexcept override {
|
|
288
|
-
auto __result = _swiftPart.getMetadataReferenceRangeUpperLimit();
|
|
289
|
-
return __result;
|
|
290
|
-
}
|
|
291
|
-
inline std::optional<double> getMetadataAlgorithmVersion() noexcept override {
|
|
292
|
-
auto __result = _swiftPart.getMetadataAlgorithmVersion();
|
|
293
|
-
return __result;
|
|
294
|
-
}
|
|
295
182
|
|
|
296
183
|
public:
|
|
297
184
|
// Methods
|
|
@@ -18,133 +18,13 @@ public extension CategorySample {
|
|
|
18
18
|
/**
|
|
19
19
|
* Create a new instance of `CategorySample`.
|
|
20
20
|
*/
|
|
21
|
-
init(categoryType: CategoryTypeIdentifier, value: Double, sampleType: SampleType, startDate: Date, endDate: Date, hasUndeterminedDuration: Bool,
|
|
22
|
-
self.init(categoryType, value, sampleType, startDate.toCpp(), endDate.toCpp(), hasUndeterminedDuration, { () -> bridge.
|
|
23
|
-
if let __unwrappedValue = metadataWeatherCondition {
|
|
24
|
-
return bridge.create_std__optional_WeatherCondition_(__unwrappedValue)
|
|
25
|
-
} else {
|
|
26
|
-
return .init()
|
|
27
|
-
}
|
|
28
|
-
}(), { () -> bridge.std__optional_Quantity_ in
|
|
29
|
-
if let __unwrappedValue = metadataWeatherHumidity {
|
|
30
|
-
return bridge.create_std__optional_Quantity_(__unwrappedValue)
|
|
31
|
-
} else {
|
|
32
|
-
return .init()
|
|
33
|
-
}
|
|
34
|
-
}(), { () -> bridge.std__optional_Quantity_ in
|
|
35
|
-
if let __unwrappedValue = metadataWeatherTemperature {
|
|
36
|
-
return bridge.create_std__optional_Quantity_(__unwrappedValue)
|
|
37
|
-
} else {
|
|
38
|
-
return .init()
|
|
39
|
-
}
|
|
40
|
-
}(), { () -> bridge.std__optional_InsulinDeliveryReason_ in
|
|
41
|
-
if let __unwrappedValue = metadataInsulinDeliveryReason {
|
|
42
|
-
return bridge.create_std__optional_InsulinDeliveryReason_(__unwrappedValue)
|
|
43
|
-
} else {
|
|
44
|
-
return .init()
|
|
45
|
-
}
|
|
46
|
-
}(), { () -> bridge.std__optional_HeartRateMotionContext_ in
|
|
47
|
-
if let __unwrappedValue = metadataHeartRateMotionContext {
|
|
48
|
-
return bridge.create_std__optional_HeartRateMotionContext_(__unwrappedValue)
|
|
49
|
-
} else {
|
|
50
|
-
return .init()
|
|
51
|
-
}
|
|
52
|
-
}(), std.string(uuid), sourceRevision, { () -> bridge.std__optional_Device_ in
|
|
21
|
+
init(categoryType: CategoryTypeIdentifier, value: Double, sampleType: SampleType, startDate: Date, endDate: Date, hasUndeterminedDuration: Bool, metadata: AnyMap, uuid: String, sourceRevision: SourceRevision, device: Device?) {
|
|
22
|
+
self.init(categoryType, value, sampleType, startDate.toCpp(), endDate.toCpp(), hasUndeterminedDuration, metadata.cppPart, std.string(uuid), sourceRevision, { () -> bridge.std__optional_Device_ in
|
|
53
23
|
if let __unwrappedValue = device {
|
|
54
24
|
return bridge.create_std__optional_Device_(__unwrappedValue)
|
|
55
25
|
} else {
|
|
56
26
|
return .init()
|
|
57
27
|
}
|
|
58
|
-
}(), metadata.cppPart, { () -> bridge.std__optional_std__string_ in
|
|
59
|
-
if let __unwrappedValue = metadataExternalUUID {
|
|
60
|
-
return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
|
|
61
|
-
} else {
|
|
62
|
-
return .init()
|
|
63
|
-
}
|
|
64
|
-
}(), { () -> bridge.std__optional_std__string_ in
|
|
65
|
-
if let __unwrappedValue = metadataTimeZone {
|
|
66
|
-
return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
|
|
67
|
-
} else {
|
|
68
|
-
return .init()
|
|
69
|
-
}
|
|
70
|
-
}(), { () -> bridge.std__optional_bool_ in
|
|
71
|
-
if let __unwrappedValue = metadataWasUserEntered {
|
|
72
|
-
return bridge.create_std__optional_bool_(__unwrappedValue)
|
|
73
|
-
} else {
|
|
74
|
-
return .init()
|
|
75
|
-
}
|
|
76
|
-
}(), { () -> bridge.std__optional_std__string_ in
|
|
77
|
-
if let __unwrappedValue = metadataDeviceSerialNumber {
|
|
78
|
-
return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
|
|
79
|
-
} else {
|
|
80
|
-
return .init()
|
|
81
|
-
}
|
|
82
|
-
}(), { () -> bridge.std__optional_std__string_ in
|
|
83
|
-
if let __unwrappedValue = metadataUdiDeviceIdentifier {
|
|
84
|
-
return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
|
|
85
|
-
} else {
|
|
86
|
-
return .init()
|
|
87
|
-
}
|
|
88
|
-
}(), { () -> bridge.std__optional_std__string_ in
|
|
89
|
-
if let __unwrappedValue = metadataUdiProductionIdentifier {
|
|
90
|
-
return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
|
|
91
|
-
} else {
|
|
92
|
-
return .init()
|
|
93
|
-
}
|
|
94
|
-
}(), { () -> bridge.std__optional_std__string_ in
|
|
95
|
-
if let __unwrappedValue = metadataDigitalSignature {
|
|
96
|
-
return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
|
|
97
|
-
} else {
|
|
98
|
-
return .init()
|
|
99
|
-
}
|
|
100
|
-
}(), { () -> bridge.std__optional_std__string_ in
|
|
101
|
-
if let __unwrappedValue = metadataDeviceName {
|
|
102
|
-
return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
|
|
103
|
-
} else {
|
|
104
|
-
return .init()
|
|
105
|
-
}
|
|
106
|
-
}(), { () -> bridge.std__optional_std__string_ in
|
|
107
|
-
if let __unwrappedValue = metadataDeviceManufacturerName {
|
|
108
|
-
return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
|
|
109
|
-
} else {
|
|
110
|
-
return .init()
|
|
111
|
-
}
|
|
112
|
-
}(), { () -> bridge.std__optional_std__string_ in
|
|
113
|
-
if let __unwrappedValue = metadataSyncIdentifier {
|
|
114
|
-
return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
|
|
115
|
-
} else {
|
|
116
|
-
return .init()
|
|
117
|
-
}
|
|
118
|
-
}(), { () -> bridge.std__optional_double_ in
|
|
119
|
-
if let __unwrappedValue = metadataSyncVersion {
|
|
120
|
-
return bridge.create_std__optional_double_(__unwrappedValue)
|
|
121
|
-
} else {
|
|
122
|
-
return .init()
|
|
123
|
-
}
|
|
124
|
-
}(), { () -> bridge.std__optional_bool_ in
|
|
125
|
-
if let __unwrappedValue = metadataWasTakenInLab {
|
|
126
|
-
return bridge.create_std__optional_bool_(__unwrappedValue)
|
|
127
|
-
} else {
|
|
128
|
-
return .init()
|
|
129
|
-
}
|
|
130
|
-
}(), { () -> bridge.std__optional_double_ in
|
|
131
|
-
if let __unwrappedValue = metadataReferenceRangeLowerLimit {
|
|
132
|
-
return bridge.create_std__optional_double_(__unwrappedValue)
|
|
133
|
-
} else {
|
|
134
|
-
return .init()
|
|
135
|
-
}
|
|
136
|
-
}(), { () -> bridge.std__optional_double_ in
|
|
137
|
-
if let __unwrappedValue = metadataReferenceRangeUpperLimit {
|
|
138
|
-
return bridge.create_std__optional_double_(__unwrappedValue)
|
|
139
|
-
} else {
|
|
140
|
-
return .init()
|
|
141
|
-
}
|
|
142
|
-
}(), { () -> bridge.std__optional_double_ in
|
|
143
|
-
if let __unwrappedValue = metadataAlgorithmVersion {
|
|
144
|
-
return bridge.create_std__optional_double_(__unwrappedValue)
|
|
145
|
-
} else {
|
|
146
|
-
return .init()
|
|
147
|
-
}
|
|
148
28
|
}())
|
|
149
29
|
}
|
|
150
30
|
|
|
@@ -179,28 +59,8 @@ public extension CategorySample {
|
|
|
179
59
|
}
|
|
180
60
|
|
|
181
61
|
@inline(__always)
|
|
182
|
-
var
|
|
183
|
-
return
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
@inline(__always)
|
|
187
|
-
var metadataWeatherHumidity: Quantity? {
|
|
188
|
-
return self.__metadataWeatherHumidity.value
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
@inline(__always)
|
|
192
|
-
var metadataWeatherTemperature: Quantity? {
|
|
193
|
-
return self.__metadataWeatherTemperature.value
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
@inline(__always)
|
|
197
|
-
var metadataInsulinDeliveryReason: InsulinDeliveryReason? {
|
|
198
|
-
return self.__metadataInsulinDeliveryReason.has_value() ? self.__metadataInsulinDeliveryReason.pointee : nil
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
@inline(__always)
|
|
202
|
-
var metadataHeartRateMotionContext: HeartRateMotionContext? {
|
|
203
|
-
return self.__metadataHeartRateMotionContext.has_value() ? self.__metadataHeartRateMotionContext.pointee : nil
|
|
62
|
+
var metadata: AnyMap {
|
|
63
|
+
return AnyMap(withCppPart: self.__metadata)
|
|
204
64
|
}
|
|
205
65
|
|
|
206
66
|
@inline(__always)
|
|
@@ -217,189 +77,4 @@ public extension CategorySample {
|
|
|
217
77
|
var device: Device? {
|
|
218
78
|
return self.__device.value
|
|
219
79
|
}
|
|
220
|
-
|
|
221
|
-
@inline(__always)
|
|
222
|
-
var metadata: AnyMap {
|
|
223
|
-
return AnyMap(withCppPart: self.__metadata)
|
|
224
|
-
}
|
|
225
|
-
|
|
226
|
-
@inline(__always)
|
|
227
|
-
var metadataExternalUUID: String? {
|
|
228
|
-
return { () -> String? in
|
|
229
|
-
if bridge.has_value_std__optional_std__string_(self.__metadataExternalUUID) {
|
|
230
|
-
let __unwrapped = bridge.get_std__optional_std__string_(self.__metadataExternalUUID)
|
|
231
|
-
return String(__unwrapped)
|
|
232
|
-
} else {
|
|
233
|
-
return nil
|
|
234
|
-
}
|
|
235
|
-
}()
|
|
236
|
-
}
|
|
237
|
-
|
|
238
|
-
@inline(__always)
|
|
239
|
-
var metadataTimeZone: String? {
|
|
240
|
-
return { () -> String? in
|
|
241
|
-
if bridge.has_value_std__optional_std__string_(self.__metadataTimeZone) {
|
|
242
|
-
let __unwrapped = bridge.get_std__optional_std__string_(self.__metadataTimeZone)
|
|
243
|
-
return String(__unwrapped)
|
|
244
|
-
} else {
|
|
245
|
-
return nil
|
|
246
|
-
}
|
|
247
|
-
}()
|
|
248
|
-
}
|
|
249
|
-
|
|
250
|
-
@inline(__always)
|
|
251
|
-
var metadataWasUserEntered: Bool? {
|
|
252
|
-
return { () -> Bool? in
|
|
253
|
-
if bridge.has_value_std__optional_bool_(self.__metadataWasUserEntered) {
|
|
254
|
-
let __unwrapped = bridge.get_std__optional_bool_(self.__metadataWasUserEntered)
|
|
255
|
-
return __unwrapped
|
|
256
|
-
} else {
|
|
257
|
-
return nil
|
|
258
|
-
}
|
|
259
|
-
}()
|
|
260
|
-
}
|
|
261
|
-
|
|
262
|
-
@inline(__always)
|
|
263
|
-
var metadataDeviceSerialNumber: String? {
|
|
264
|
-
return { () -> String? in
|
|
265
|
-
if bridge.has_value_std__optional_std__string_(self.__metadataDeviceSerialNumber) {
|
|
266
|
-
let __unwrapped = bridge.get_std__optional_std__string_(self.__metadataDeviceSerialNumber)
|
|
267
|
-
return String(__unwrapped)
|
|
268
|
-
} else {
|
|
269
|
-
return nil
|
|
270
|
-
}
|
|
271
|
-
}()
|
|
272
|
-
}
|
|
273
|
-
|
|
274
|
-
@inline(__always)
|
|
275
|
-
var metadataUdiDeviceIdentifier: String? {
|
|
276
|
-
return { () -> String? in
|
|
277
|
-
if bridge.has_value_std__optional_std__string_(self.__metadataUdiDeviceIdentifier) {
|
|
278
|
-
let __unwrapped = bridge.get_std__optional_std__string_(self.__metadataUdiDeviceIdentifier)
|
|
279
|
-
return String(__unwrapped)
|
|
280
|
-
} else {
|
|
281
|
-
return nil
|
|
282
|
-
}
|
|
283
|
-
}()
|
|
284
|
-
}
|
|
285
|
-
|
|
286
|
-
@inline(__always)
|
|
287
|
-
var metadataUdiProductionIdentifier: String? {
|
|
288
|
-
return { () -> String? in
|
|
289
|
-
if bridge.has_value_std__optional_std__string_(self.__metadataUdiProductionIdentifier) {
|
|
290
|
-
let __unwrapped = bridge.get_std__optional_std__string_(self.__metadataUdiProductionIdentifier)
|
|
291
|
-
return String(__unwrapped)
|
|
292
|
-
} else {
|
|
293
|
-
return nil
|
|
294
|
-
}
|
|
295
|
-
}()
|
|
296
|
-
}
|
|
297
|
-
|
|
298
|
-
@inline(__always)
|
|
299
|
-
var metadataDigitalSignature: String? {
|
|
300
|
-
return { () -> String? in
|
|
301
|
-
if bridge.has_value_std__optional_std__string_(self.__metadataDigitalSignature) {
|
|
302
|
-
let __unwrapped = bridge.get_std__optional_std__string_(self.__metadataDigitalSignature)
|
|
303
|
-
return String(__unwrapped)
|
|
304
|
-
} else {
|
|
305
|
-
return nil
|
|
306
|
-
}
|
|
307
|
-
}()
|
|
308
|
-
}
|
|
309
|
-
|
|
310
|
-
@inline(__always)
|
|
311
|
-
var metadataDeviceName: String? {
|
|
312
|
-
return { () -> String? in
|
|
313
|
-
if bridge.has_value_std__optional_std__string_(self.__metadataDeviceName) {
|
|
314
|
-
let __unwrapped = bridge.get_std__optional_std__string_(self.__metadataDeviceName)
|
|
315
|
-
return String(__unwrapped)
|
|
316
|
-
} else {
|
|
317
|
-
return nil
|
|
318
|
-
}
|
|
319
|
-
}()
|
|
320
|
-
}
|
|
321
|
-
|
|
322
|
-
@inline(__always)
|
|
323
|
-
var metadataDeviceManufacturerName: String? {
|
|
324
|
-
return { () -> String? in
|
|
325
|
-
if bridge.has_value_std__optional_std__string_(self.__metadataDeviceManufacturerName) {
|
|
326
|
-
let __unwrapped = bridge.get_std__optional_std__string_(self.__metadataDeviceManufacturerName)
|
|
327
|
-
return String(__unwrapped)
|
|
328
|
-
} else {
|
|
329
|
-
return nil
|
|
330
|
-
}
|
|
331
|
-
}()
|
|
332
|
-
}
|
|
333
|
-
|
|
334
|
-
@inline(__always)
|
|
335
|
-
var metadataSyncIdentifier: String? {
|
|
336
|
-
return { () -> String? in
|
|
337
|
-
if bridge.has_value_std__optional_std__string_(self.__metadataSyncIdentifier) {
|
|
338
|
-
let __unwrapped = bridge.get_std__optional_std__string_(self.__metadataSyncIdentifier)
|
|
339
|
-
return String(__unwrapped)
|
|
340
|
-
} else {
|
|
341
|
-
return nil
|
|
342
|
-
}
|
|
343
|
-
}()
|
|
344
|
-
}
|
|
345
|
-
|
|
346
|
-
@inline(__always)
|
|
347
|
-
var metadataSyncVersion: Double? {
|
|
348
|
-
return { () -> Double? in
|
|
349
|
-
if bridge.has_value_std__optional_double_(self.__metadataSyncVersion) {
|
|
350
|
-
let __unwrapped = bridge.get_std__optional_double_(self.__metadataSyncVersion)
|
|
351
|
-
return __unwrapped
|
|
352
|
-
} else {
|
|
353
|
-
return nil
|
|
354
|
-
}
|
|
355
|
-
}()
|
|
356
|
-
}
|
|
357
|
-
|
|
358
|
-
@inline(__always)
|
|
359
|
-
var metadataWasTakenInLab: Bool? {
|
|
360
|
-
return { () -> Bool? in
|
|
361
|
-
if bridge.has_value_std__optional_bool_(self.__metadataWasTakenInLab) {
|
|
362
|
-
let __unwrapped = bridge.get_std__optional_bool_(self.__metadataWasTakenInLab)
|
|
363
|
-
return __unwrapped
|
|
364
|
-
} else {
|
|
365
|
-
return nil
|
|
366
|
-
}
|
|
367
|
-
}()
|
|
368
|
-
}
|
|
369
|
-
|
|
370
|
-
@inline(__always)
|
|
371
|
-
var metadataReferenceRangeLowerLimit: Double? {
|
|
372
|
-
return { () -> Double? in
|
|
373
|
-
if bridge.has_value_std__optional_double_(self.__metadataReferenceRangeLowerLimit) {
|
|
374
|
-
let __unwrapped = bridge.get_std__optional_double_(self.__metadataReferenceRangeLowerLimit)
|
|
375
|
-
return __unwrapped
|
|
376
|
-
} else {
|
|
377
|
-
return nil
|
|
378
|
-
}
|
|
379
|
-
}()
|
|
380
|
-
}
|
|
381
|
-
|
|
382
|
-
@inline(__always)
|
|
383
|
-
var metadataReferenceRangeUpperLimit: Double? {
|
|
384
|
-
return { () -> Double? in
|
|
385
|
-
if bridge.has_value_std__optional_double_(self.__metadataReferenceRangeUpperLimit) {
|
|
386
|
-
let __unwrapped = bridge.get_std__optional_double_(self.__metadataReferenceRangeUpperLimit)
|
|
387
|
-
return __unwrapped
|
|
388
|
-
} else {
|
|
389
|
-
return nil
|
|
390
|
-
}
|
|
391
|
-
}()
|
|
392
|
-
}
|
|
393
|
-
|
|
394
|
-
@inline(__always)
|
|
395
|
-
var metadataAlgorithmVersion: Double? {
|
|
396
|
-
return { () -> Double? in
|
|
397
|
-
if bridge.has_value_std__optional_double_(self.__metadataAlgorithmVersion) {
|
|
398
|
-
let __unwrapped = bridge.get_std__optional_double_(self.__metadataAlgorithmVersion)
|
|
399
|
-
return __unwrapped
|
|
400
|
-
} else {
|
|
401
|
-
return nil
|
|
402
|
-
}
|
|
403
|
-
}()
|
|
404
|
-
}
|
|
405
80
|
}
|