@kingstinct/react-native-healthkit 14.1.0 → 16.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/README.md +37 -3
- package/ReactNativeHealthkit.podspec +11 -7
- package/app.plugin.js +33 -94
- package/app.plugin.ts +29 -104
- package/ios/CategoryTypeModule.swift +1 -0
- package/ios/CharacteristicTypeModule.swift +7 -6
- package/ios/Constants.swift +9 -10
- package/ios/CoreModule.swift +77 -42
- package/ios/CorrelationTypeModule.swift +3 -2
- package/ios/ElectrocardiogramModule.swift +4 -3
- package/ios/HeartbeatSeriesModule.swift +4 -3
- package/ios/Helpers.swift +11 -216
- package/ios/MedicationModule.swift +9 -8
- package/ios/MemoryEstimation.swift +84 -0
- package/ios/PredicateHelpers.swift +16 -86
- package/ios/QuantityTypeModule.swift +37 -28
- package/ios/Serializers.swift +34 -70
- package/ios/SourceProxy.swift +15 -5
- package/ios/StateOfMindModule.swift +3 -2
- package/ios/WorkoutProxy.swift +31 -13
- package/ios/WorkoutsModule.swift +4 -3
- package/lib/commonjs/generated/healthkit.generated.js +15 -3
- package/lib/commonjs/healthkit.ios.js +6 -2
- package/lib/commonjs/healthkit.js +24 -79
- package/lib/commonjs/types/Auth.js +3 -18
- package/lib/commonjs/types/Background.js +2 -10
- package/lib/commonjs/types/QueryOptions.js +2 -17
- package/lib/module/generated/healthkit.generated.js +14 -2
- package/lib/module/healthkit.ios.js +4 -0
- package/lib/module/healthkit.js +22 -77
- package/lib/module/types/Auth.js +1 -18
- package/lib/module/types/Background.js +1 -10
- package/lib/module/types/QueryOptions.js +1 -17
- package/lib/typescript/generated/healthkit.generated.d.ts +20 -7
- package/lib/typescript/healthkit.d.ts +4 -2
- package/lib/typescript/healthkit.ios.d.ts +13 -9
- package/lib/typescript/specs/CoreModule.nitro.d.ts +22 -4
- package/lib/typescript/specs/SourceProxy.nitro.d.ts +2 -5
- package/lib/typescript/types/Auth.d.ts +1 -16
- package/lib/typescript/types/Background.d.ts +1 -9
- package/lib/typescript/types/Device.d.ts +1 -13
- package/lib/typescript/types/QuantityType.d.ts +3 -3
- package/lib/typescript/types/QueryOptions.d.ts +3 -37
- package/lib/typescript/types/Shared.d.ts +2 -25
- package/lib/typescript/types/Source.d.ts +1 -10
- package/lib/typescript/types/Subscriptions.d.ts +2 -3
- package/lib/typescript/types/Units.d.ts +1 -1
- package/nitrogen/generated/ios/ReactNativeHealthkit-Swift-Cxx-Bridge.cpp +24 -16
- package/nitrogen/generated/ios/ReactNativeHealthkit-Swift-Cxx-Bridge.hpp +91 -12
- package/nitrogen/generated/ios/c++/HybridCategoryTypeModuleSpecSwift.hpp +8 -5
- package/nitrogen/generated/ios/c++/HybridCoreModuleSpecSwift.hpp +8 -0
- package/nitrogen/generated/ios/c++/HybridCorrelationTypeModuleSpecSwift.hpp +8 -5
- package/nitrogen/generated/ios/c++/HybridElectrocardiogramModuleSpecSwift.hpp +8 -5
- package/nitrogen/generated/ios/c++/HybridHeartbeatSeriesModuleSpecSwift.hpp +8 -5
- package/nitrogen/generated/ios/c++/HybridMedicationModuleSpecSwift.hpp +8 -5
- package/nitrogen/generated/ios/c++/HybridQuantityTypeModuleSpecSwift.hpp +8 -5
- package/nitrogen/generated/ios/c++/HybridStateOfMindModuleSpecSwift.hpp +8 -5
- package/nitrogen/generated/ios/c++/HybridWorkoutProxySpecSwift.hpp +3 -4
- package/nitrogen/generated/ios/c++/HybridWorkoutsModuleSpecSwift.hpp +6 -3
- package/nitrogen/generated/ios/swift/CategorySample.swift +8 -8
- package/nitrogen/generated/ios/swift/CategoryTypeIdentifier.swift +8 -0
- package/nitrogen/generated/ios/swift/CategoryTypeIdentifierWriteable.swift +8 -0
- package/nitrogen/generated/ios/swift/CorrelationSample.swift +8 -8
- package/nitrogen/generated/ios/swift/ElectrocardiogramSample.swift +8 -8
- package/nitrogen/generated/ios/swift/Func_void_std__unordered_map_std__string__std__chrono__system_clock__time_point_.swift +54 -0
- package/nitrogen/generated/ios/swift/HeartbeatSeriesSample.swift +8 -8
- package/nitrogen/generated/ios/swift/HybridCoreModuleSpec.swift +1 -0
- package/nitrogen/generated/ios/swift/HybridCoreModuleSpec_cxx.swift +25 -0
- package/nitrogen/generated/ios/swift/MedicationDoseEvent.swift +8 -8
- package/nitrogen/generated/ios/swift/ObjectTypeIdentifier.swift +12 -4
- package/nitrogen/generated/ios/swift/QuantitySample.swift +8 -8
- package/nitrogen/generated/ios/swift/QuantityTypeIdentifier.swift +4 -4
- package/nitrogen/generated/ios/swift/QuantityTypeIdentifierWriteable.swift +4 -4
- package/nitrogen/generated/ios/swift/QueryStatisticsResponse.swift +6 -13
- package/nitrogen/generated/ios/swift/QueryStatisticsResponseFromSingleSource.swift +4 -11
- package/nitrogen/generated/ios/swift/SampleTypeIdentifier.swift +12 -4
- package/nitrogen/generated/ios/swift/SampleTypeIdentifierWriteable.swift +12 -4
- package/nitrogen/generated/ios/swift/SourceRevision.swift +4 -11
- package/nitrogen/generated/ios/swift/StateOfMindSample.swift +8 -8
- package/nitrogen/generated/ios/swift/WorkoutActivityType.swift +8 -0
- package/nitrogen/generated/shared/c++/CategorySample.hpp +7 -7
- package/nitrogen/generated/shared/c++/CategoryTypeIdentifier.hpp +67 -59
- package/nitrogen/generated/shared/c++/CategoryTypeIdentifierWriteable.hpp +67 -59
- package/nitrogen/generated/shared/c++/CorrelationSample.hpp +7 -7
- package/nitrogen/generated/shared/c++/ElectrocardiogramSample.hpp +7 -7
- package/nitrogen/generated/shared/c++/HeartbeatSeriesSample.hpp +7 -7
- package/nitrogen/generated/shared/c++/HybridCoreModuleSpec.cpp +1 -0
- package/nitrogen/generated/shared/c++/HybridCoreModuleSpec.hpp +3 -1
- package/nitrogen/generated/shared/c++/MedicationDoseEvent.hpp +7 -7
- package/nitrogen/generated/shared/c++/ObjectTypeIdentifier.hpp +206 -198
- package/nitrogen/generated/shared/c++/QuantitySample.hpp +7 -7
- package/nitrogen/generated/shared/c++/QuantityTypeIdentifier.hpp +73 -73
- package/nitrogen/generated/shared/c++/QuantityTypeIdentifierWriteable.hpp +73 -73
- package/nitrogen/generated/shared/c++/QueryStatisticsResponse.hpp +8 -9
- package/nitrogen/generated/shared/c++/QueryStatisticsResponseFromSingleSource.hpp +8 -9
- package/nitrogen/generated/shared/c++/SampleTypeIdentifier.hpp +199 -191
- package/nitrogen/generated/shared/c++/SampleTypeIdentifierWriteable.hpp +193 -185
- package/nitrogen/generated/shared/c++/SourceRevision.hpp +8 -9
- package/nitrogen/generated/shared/c++/StateOfMindSample.hpp +7 -7
- package/nitrogen/generated/shared/c++/WorkoutActivityType.hpp +4 -0
- package/package.json +8 -3
- package/src/generated/healthkit-schema.json +53 -8
- package/src/generated/healthkit.generated.ts +22 -6
- package/src/healthkit.ios.ts +6 -0
- package/src/healthkit.ts +32 -84
- package/src/specs/CoreModule.nitro.ts +25 -4
- package/src/specs/SourceProxy.nitro.ts +2 -4
- package/src/test-setup.ts +1 -0
- package/src/type-tests/generated-typing.ts +30 -8
- package/src/types/Auth.ts +4 -17
- package/src/types/Background.ts +1 -9
- package/src/types/Device.ts +1 -13
- package/src/types/QuantityType.ts +3 -3
- package/src/types/QueryOptions.ts +7 -65
- package/src/types/Shared.ts +7 -28
- package/src/types/Source.ts +1 -11
- package/src/types/Subscriptions.ts +2 -3
- package/src/types/Units.ts +1 -1
- package/ios/BackgroundDeliveryManager.swift +0 -277
- package/ios/Bridge.h +0 -10
- package/ios/ExceptionCatcher.h +0 -5
- package/ios/ExceptionCatcher.mm +0 -32
- package/ios/module.modulemap +0 -5
|
@@ -22,8 +22,8 @@ namespace margelo::nitro::healthkit { struct QuantitySample; }
|
|
|
22
22
|
namespace margelo::nitro::healthkit { struct SampleType; }
|
|
23
23
|
// Forward declaration of `SourceRevision` to properly resolve imports.
|
|
24
24
|
namespace margelo::nitro::healthkit { struct SourceRevision; }
|
|
25
|
-
// Forward declaration of `
|
|
26
|
-
namespace margelo::nitro::healthkit {
|
|
25
|
+
// Forward declaration of `Source` to properly resolve imports.
|
|
26
|
+
namespace margelo::nitro::healthkit { struct Source; }
|
|
27
27
|
// Forward declaration of `Device` to properly resolve imports.
|
|
28
28
|
namespace margelo::nitro::healthkit { struct Device; }
|
|
29
29
|
// Forward declaration of `QuantityTypeIdentifierWriteable` to properly resolve imports.
|
|
@@ -32,6 +32,8 @@ namespace margelo::nitro::healthkit { enum class QuantityTypeIdentifierWriteable
|
|
|
32
32
|
namespace margelo::nitro::healthkit { struct QueryOptionsWithSortOrderAndStringUnit; }
|
|
33
33
|
// Forward declaration of `FilterForSamples` to properly resolve imports.
|
|
34
34
|
namespace margelo::nitro::healthkit { struct FilterForSamples; }
|
|
35
|
+
// Forward declaration of `HybridSourceProxySpec` to properly resolve imports.
|
|
36
|
+
namespace margelo::nitro::healthkit { class HybridSourceProxySpec; }
|
|
35
37
|
// Forward declaration of `FilterForSamplesBase` to properly resolve imports.
|
|
36
38
|
namespace margelo::nitro::healthkit { struct FilterForSamplesBase; }
|
|
37
39
|
// Forward declaration of `PredicateWithMetadataKey` to properly resolve imports.
|
|
@@ -71,15 +73,16 @@ namespace margelo::nitro::healthkit { struct QueryOptionsWithAnchorAndStringUnit
|
|
|
71
73
|
#include <NitroModules/Promise.hpp>
|
|
72
74
|
#include "SampleType.hpp"
|
|
73
75
|
#include <chrono>
|
|
74
|
-
#include <NitroModules/AnyMap.hpp>
|
|
75
76
|
#include "SourceRevision.hpp"
|
|
76
|
-
#include
|
|
77
|
-
#include "HybridSourceProxySpec.hpp"
|
|
77
|
+
#include "Source.hpp"
|
|
78
78
|
#include "Device.hpp"
|
|
79
|
+
#include <NitroModules/AnyMap.hpp>
|
|
79
80
|
#include "QuantityTypeIdentifierWriteable.hpp"
|
|
80
81
|
#include <vector>
|
|
81
82
|
#include "QueryOptionsWithSortOrderAndStringUnit.hpp"
|
|
82
83
|
#include "FilterForSamples.hpp"
|
|
84
|
+
#include <memory>
|
|
85
|
+
#include "HybridSourceProxySpec.hpp"
|
|
83
86
|
#include "FilterForSamplesBase.hpp"
|
|
84
87
|
#include "PredicateWithMetadataKey.hpp"
|
|
85
88
|
#include "ComparisonPredicateOperator.hpp"
|
|
@@ -26,14 +26,16 @@ namespace margelo::nitro::healthkit { enum class StateOfMindLabel; }
|
|
|
26
26
|
namespace margelo::nitro::healthkit { struct SampleType; }
|
|
27
27
|
// Forward declaration of `SourceRevision` to properly resolve imports.
|
|
28
28
|
namespace margelo::nitro::healthkit { struct SourceRevision; }
|
|
29
|
-
// Forward declaration of `
|
|
30
|
-
namespace margelo::nitro::healthkit {
|
|
29
|
+
// Forward declaration of `Source` to properly resolve imports.
|
|
30
|
+
namespace margelo::nitro::healthkit { struct Source; }
|
|
31
31
|
// Forward declaration of `Device` to properly resolve imports.
|
|
32
32
|
namespace margelo::nitro::healthkit { struct Device; }
|
|
33
33
|
// Forward declaration of `QueryOptionsWithSortOrder` to properly resolve imports.
|
|
34
34
|
namespace margelo::nitro::healthkit { struct QueryOptionsWithSortOrder; }
|
|
35
35
|
// Forward declaration of `FilterForSamples` to properly resolve imports.
|
|
36
36
|
namespace margelo::nitro::healthkit { struct FilterForSamples; }
|
|
37
|
+
// Forward declaration of `HybridSourceProxySpec` to properly resolve imports.
|
|
38
|
+
namespace margelo::nitro::healthkit { class HybridSourceProxySpec; }
|
|
37
39
|
// Forward declaration of `FilterForSamplesBase` to properly resolve imports.
|
|
38
40
|
namespace margelo::nitro::healthkit { struct FilterForSamplesBase; }
|
|
39
41
|
// Forward declaration of `PredicateWithMetadataKey` to properly resolve imports.
|
|
@@ -61,14 +63,15 @@ namespace margelo::nitro::healthkit { struct QueryOptionsWithAnchor; }
|
|
|
61
63
|
#include "SampleType.hpp"
|
|
62
64
|
#include <string>
|
|
63
65
|
#include <chrono>
|
|
64
|
-
#include <NitroModules/AnyMap.hpp>
|
|
65
66
|
#include "SourceRevision.hpp"
|
|
66
|
-
#include
|
|
67
|
-
#include "HybridSourceProxySpec.hpp"
|
|
67
|
+
#include "Source.hpp"
|
|
68
68
|
#include <optional>
|
|
69
69
|
#include "Device.hpp"
|
|
70
|
+
#include <NitroModules/AnyMap.hpp>
|
|
70
71
|
#include "QueryOptionsWithSortOrder.hpp"
|
|
71
72
|
#include "FilterForSamples.hpp"
|
|
73
|
+
#include <memory>
|
|
74
|
+
#include "HybridSourceProxySpec.hpp"
|
|
72
75
|
#include "FilterForSamplesBase.hpp"
|
|
73
76
|
#include "PredicateWithMetadataKey.hpp"
|
|
74
77
|
#include "ComparisonPredicateOperator.hpp"
|
|
@@ -26,8 +26,8 @@ namespace margelo::nitro::healthkit { struct WorkoutActivity; }
|
|
|
26
26
|
namespace margelo::nitro::healthkit { struct SampleType; }
|
|
27
27
|
// Forward declaration of `SourceRevision` to properly resolve imports.
|
|
28
28
|
namespace margelo::nitro::healthkit { struct SourceRevision; }
|
|
29
|
-
// Forward declaration of `
|
|
30
|
-
namespace margelo::nitro::healthkit {
|
|
29
|
+
// Forward declaration of `Source` to properly resolve imports.
|
|
30
|
+
namespace margelo::nitro::healthkit { struct Source; }
|
|
31
31
|
// Forward declaration of `Device` to properly resolve imports.
|
|
32
32
|
namespace margelo::nitro::healthkit { struct Device; }
|
|
33
33
|
// Forward declaration of `WorkoutSample` to properly resolve imports.
|
|
@@ -59,8 +59,7 @@ namespace margelo::nitro::healthkit { enum class QuantityTypeIdentifier; }
|
|
|
59
59
|
#include "WorkoutActivity.hpp"
|
|
60
60
|
#include "SampleType.hpp"
|
|
61
61
|
#include "SourceRevision.hpp"
|
|
62
|
-
#include
|
|
63
|
-
#include "HybridSourceProxySpec.hpp"
|
|
62
|
+
#include "Source.hpp"
|
|
64
63
|
#include "Device.hpp"
|
|
65
64
|
#include "WorkoutSample.hpp"
|
|
66
65
|
#include <NitroModules/Promise.hpp>
|
|
@@ -22,8 +22,8 @@ namespace margelo::nitro::healthkit { struct QuantitySampleForSaving; }
|
|
|
22
22
|
namespace margelo::nitro::healthkit { enum class QuantityTypeIdentifier; }
|
|
23
23
|
// Forward declaration of `SourceRevision` to properly resolve imports.
|
|
24
24
|
namespace margelo::nitro::healthkit { struct SourceRevision; }
|
|
25
|
-
// Forward declaration of `
|
|
26
|
-
namespace margelo::nitro::healthkit {
|
|
25
|
+
// Forward declaration of `Source` to properly resolve imports.
|
|
26
|
+
namespace margelo::nitro::healthkit { struct Source; }
|
|
27
27
|
// Forward declaration of `WorkoutTotals` to properly resolve imports.
|
|
28
28
|
namespace margelo::nitro::healthkit { struct WorkoutTotals; }
|
|
29
29
|
// Forward declaration of `QueryWorkoutSamplesWithAnchorResponse` to properly resolve imports.
|
|
@@ -42,6 +42,8 @@ namespace margelo::nitro::healthkit { struct WorkoutDurationPredicate; }
|
|
|
42
42
|
namespace margelo::nitro::healthkit { enum class ComparisonPredicateOperator; }
|
|
43
43
|
// Forward declaration of `PredicateWithMetadataKey` to properly resolve imports.
|
|
44
44
|
namespace margelo::nitro::healthkit { struct PredicateWithMetadataKey; }
|
|
45
|
+
// Forward declaration of `HybridSourceProxySpec` to properly resolve imports.
|
|
46
|
+
namespace margelo::nitro::healthkit { class HybridSourceProxySpec; }
|
|
45
47
|
// Forward declaration of `DateFilter` to properly resolve imports.
|
|
46
48
|
namespace margelo::nitro::healthkit { struct DateFilter; }
|
|
47
49
|
// Forward declaration of `WorkoutQueryOptions` to properly resolve imports.
|
|
@@ -63,7 +65,7 @@ namespace margelo::nitro::healthkit { enum class WorkoutSessionLocationType; }
|
|
|
63
65
|
#include <NitroModules/AnyMap.hpp>
|
|
64
66
|
#include <optional>
|
|
65
67
|
#include "SourceRevision.hpp"
|
|
66
|
-
#include "
|
|
68
|
+
#include "Source.hpp"
|
|
67
69
|
#include "WorkoutTotals.hpp"
|
|
68
70
|
#include "QueryWorkoutSamplesWithAnchorResponse.hpp"
|
|
69
71
|
#include "DeletedSample.hpp"
|
|
@@ -74,6 +76,7 @@ namespace margelo::nitro::healthkit { enum class WorkoutSessionLocationType; }
|
|
|
74
76
|
#include "ComparisonPredicateOperator.hpp"
|
|
75
77
|
#include "PredicateWithMetadataKey.hpp"
|
|
76
78
|
#include <variant>
|
|
79
|
+
#include "HybridSourceProxySpec.hpp"
|
|
77
80
|
#include "DateFilter.hpp"
|
|
78
81
|
#include "WorkoutQueryOptions.hpp"
|
|
79
82
|
#include "WorkoutConfiguration.hpp"
|
|
@@ -18,14 +18,14 @@ 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,
|
|
21
|
+
init(categoryType: CategoryTypeIdentifier, value: Double, sampleType: SampleType, startDate: Date, endDate: Date, hasUndeterminedDuration: Bool, uuid: String, sourceRevision: SourceRevision, device: Device?, metadata: AnyMap) {
|
|
22
|
+
self.init(categoryType, value, sampleType, startDate.toCpp(), endDate.toCpp(), hasUndeterminedDuration, std.string(uuid), sourceRevision, { () -> bridge.std__optional_Device_ in
|
|
23
23
|
if let __unwrappedValue = device {
|
|
24
24
|
return bridge.create_std__optional_Device_(__unwrappedValue)
|
|
25
25
|
} else {
|
|
26
26
|
return .init()
|
|
27
27
|
}
|
|
28
|
-
}())
|
|
28
|
+
}(), metadata.cppPart)
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
@inline(__always)
|
|
@@ -58,11 +58,6 @@ public extension CategorySample {
|
|
|
58
58
|
return self.__hasUndeterminedDuration
|
|
59
59
|
}
|
|
60
60
|
|
|
61
|
-
@inline(__always)
|
|
62
|
-
var metadata: AnyMap {
|
|
63
|
-
return AnyMap(withCppPart: self.__metadata)
|
|
64
|
-
}
|
|
65
|
-
|
|
66
61
|
@inline(__always)
|
|
67
62
|
var uuid: String {
|
|
68
63
|
return String(self.__uuid)
|
|
@@ -77,4 +72,9 @@ public extension CategorySample {
|
|
|
77
72
|
var device: Device? {
|
|
78
73
|
return self.__device.value
|
|
79
74
|
}
|
|
75
|
+
|
|
76
|
+
@inline(__always)
|
|
77
|
+
var metadata: AnyMap {
|
|
78
|
+
return AnyMap(withCppPart: self.__metadata)
|
|
79
|
+
}
|
|
80
80
|
}
|
|
@@ -39,6 +39,8 @@ public extension CategoryTypeIdentifier {
|
|
|
39
39
|
self = .hkcategorytypeidentifieraudioexposureevent
|
|
40
40
|
case "HKCategoryTypeIdentifierBladderIncontinence":
|
|
41
41
|
self = .hkcategorytypeidentifierbladderincontinence
|
|
42
|
+
case "HKCategoryTypeIdentifierBleedingAfterMenopause":
|
|
43
|
+
self = .hkcategorytypeidentifierbleedingaftermenopause
|
|
42
44
|
case "HKCategoryTypeIdentifierBleedingAfterPregnancy":
|
|
43
45
|
self = .hkcategorytypeidentifierbleedingafterpregnancy
|
|
44
46
|
case "HKCategoryTypeIdentifierBleedingDuringPregnancy":
|
|
@@ -105,6 +107,8 @@ public extension CategoryTypeIdentifier {
|
|
|
105
107
|
self = .hkcategorytypeidentifierlowerbackpain
|
|
106
108
|
case "HKCategoryTypeIdentifierMemoryLapse":
|
|
107
109
|
self = .hkcategorytypeidentifiermemorylapse
|
|
110
|
+
case "HKCategoryTypeIdentifierMenopausalState":
|
|
111
|
+
self = .hkcategorytypeidentifiermenopausalstate
|
|
108
112
|
case "HKCategoryTypeIdentifierMenstrualFlow":
|
|
109
113
|
self = .hkcategorytypeidentifiermenstrualflow
|
|
110
114
|
case "HKCategoryTypeIdentifierMindfulSession":
|
|
@@ -189,6 +193,8 @@ public extension CategoryTypeIdentifier {
|
|
|
189
193
|
return "HKCategoryTypeIdentifierAudioExposureEvent"
|
|
190
194
|
case .hkcategorytypeidentifierbladderincontinence:
|
|
191
195
|
return "HKCategoryTypeIdentifierBladderIncontinence"
|
|
196
|
+
case .hkcategorytypeidentifierbleedingaftermenopause:
|
|
197
|
+
return "HKCategoryTypeIdentifierBleedingAfterMenopause"
|
|
192
198
|
case .hkcategorytypeidentifierbleedingafterpregnancy:
|
|
193
199
|
return "HKCategoryTypeIdentifierBleedingAfterPregnancy"
|
|
194
200
|
case .hkcategorytypeidentifierbleedingduringpregnancy:
|
|
@@ -255,6 +261,8 @@ public extension CategoryTypeIdentifier {
|
|
|
255
261
|
return "HKCategoryTypeIdentifierLowerBackPain"
|
|
256
262
|
case .hkcategorytypeidentifiermemorylapse:
|
|
257
263
|
return "HKCategoryTypeIdentifierMemoryLapse"
|
|
264
|
+
case .hkcategorytypeidentifiermenopausalstate:
|
|
265
|
+
return "HKCategoryTypeIdentifierMenopausalState"
|
|
258
266
|
case .hkcategorytypeidentifiermenstrualflow:
|
|
259
267
|
return "HKCategoryTypeIdentifierMenstrualFlow"
|
|
260
268
|
case .hkcategorytypeidentifiermindfulsession:
|
|
@@ -29,6 +29,8 @@ public extension CategoryTypeIdentifierWriteable {
|
|
|
29
29
|
self = .hkcategorytypeidentifieraudioexposureevent
|
|
30
30
|
case "HKCategoryTypeIdentifierBladderIncontinence":
|
|
31
31
|
self = .hkcategorytypeidentifierbladderincontinence
|
|
32
|
+
case "HKCategoryTypeIdentifierBleedingAfterMenopause":
|
|
33
|
+
self = .hkcategorytypeidentifierbleedingaftermenopause
|
|
32
34
|
case "HKCategoryTypeIdentifierBleedingAfterPregnancy":
|
|
33
35
|
self = .hkcategorytypeidentifierbleedingafterpregnancy
|
|
34
36
|
case "HKCategoryTypeIdentifierBleedingDuringPregnancy":
|
|
@@ -95,6 +97,8 @@ public extension CategoryTypeIdentifierWriteable {
|
|
|
95
97
|
self = .hkcategorytypeidentifierlowerbackpain
|
|
96
98
|
case "HKCategoryTypeIdentifierMemoryLapse":
|
|
97
99
|
self = .hkcategorytypeidentifiermemorylapse
|
|
100
|
+
case "HKCategoryTypeIdentifierMenopausalState":
|
|
101
|
+
self = .hkcategorytypeidentifiermenopausalstate
|
|
98
102
|
case "HKCategoryTypeIdentifierMenstrualFlow":
|
|
99
103
|
self = .hkcategorytypeidentifiermenstrualflow
|
|
100
104
|
case "HKCategoryTypeIdentifierMindfulSession":
|
|
@@ -169,6 +173,8 @@ public extension CategoryTypeIdentifierWriteable {
|
|
|
169
173
|
return "HKCategoryTypeIdentifierAudioExposureEvent"
|
|
170
174
|
case .hkcategorytypeidentifierbladderincontinence:
|
|
171
175
|
return "HKCategoryTypeIdentifierBladderIncontinence"
|
|
176
|
+
case .hkcategorytypeidentifierbleedingaftermenopause:
|
|
177
|
+
return "HKCategoryTypeIdentifierBleedingAfterMenopause"
|
|
172
178
|
case .hkcategorytypeidentifierbleedingafterpregnancy:
|
|
173
179
|
return "HKCategoryTypeIdentifierBleedingAfterPregnancy"
|
|
174
180
|
case .hkcategorytypeidentifierbleedingduringpregnancy:
|
|
@@ -235,6 +241,8 @@ public extension CategoryTypeIdentifierWriteable {
|
|
|
235
241
|
return "HKCategoryTypeIdentifierLowerBackPain"
|
|
236
242
|
case .hkcategorytypeidentifiermemorylapse:
|
|
237
243
|
return "HKCategoryTypeIdentifierMemoryLapse"
|
|
244
|
+
case .hkcategorytypeidentifiermenopausalstate:
|
|
245
|
+
return "HKCategoryTypeIdentifierMenopausalState"
|
|
238
246
|
case .hkcategorytypeidentifiermenstrualflow:
|
|
239
247
|
return "HKCategoryTypeIdentifierMenstrualFlow"
|
|
240
248
|
case .hkcategorytypeidentifiermindfulsession:
|
|
@@ -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], sampleType: SampleType, startDate: Date, endDate: Date, hasUndeterminedDuration: Bool,
|
|
21
|
+
init(correlationType: CorrelationTypeIdentifier, objects: [CorrelationObject], sampleType: SampleType, startDate: Date, endDate: Date, hasUndeterminedDuration: Bool, uuid: String, sourceRevision: SourceRevision, device: Device?, metadata: AnyMap) {
|
|
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 {
|
|
@@ -32,13 +32,13 @@ public extension CorrelationSample {
|
|
|
32
32
|
}().variant)
|
|
33
33
|
}
|
|
34
34
|
return __vector
|
|
35
|
-
}(), sampleType, startDate.toCpp(), endDate.toCpp(), hasUndeterminedDuration,
|
|
35
|
+
}(), sampleType, startDate.toCpp(), endDate.toCpp(), hasUndeterminedDuration, std.string(uuid), sourceRevision, { () -> bridge.std__optional_Device_ in
|
|
36
36
|
if let __unwrappedValue = device {
|
|
37
37
|
return bridge.create_std__optional_Device_(__unwrappedValue)
|
|
38
38
|
} else {
|
|
39
39
|
return .init()
|
|
40
40
|
}
|
|
41
|
-
}())
|
|
41
|
+
}(), metadata.cppPart)
|
|
42
42
|
}
|
|
43
43
|
|
|
44
44
|
@inline(__always)
|
|
@@ -83,11 +83,6 @@ public extension CorrelationSample {
|
|
|
83
83
|
return self.__hasUndeterminedDuration
|
|
84
84
|
}
|
|
85
85
|
|
|
86
|
-
@inline(__always)
|
|
87
|
-
var metadata: AnyMap {
|
|
88
|
-
return AnyMap(withCppPart: self.__metadata)
|
|
89
|
-
}
|
|
90
|
-
|
|
91
86
|
@inline(__always)
|
|
92
87
|
var uuid: String {
|
|
93
88
|
return String(self.__uuid)
|
|
@@ -102,4 +97,9 @@ public extension CorrelationSample {
|
|
|
102
97
|
var device: Device? {
|
|
103
98
|
return self.__device.value
|
|
104
99
|
}
|
|
100
|
+
|
|
101
|
+
@inline(__always)
|
|
102
|
+
var metadata: AnyMap {
|
|
103
|
+
return AnyMap(withCppPart: self.__metadata)
|
|
104
|
+
}
|
|
105
105
|
}
|
|
@@ -18,7 +18,7 @@ public extension ElectrocardiogramSample {
|
|
|
18
18
|
/**
|
|
19
19
|
* Create a new instance of `ElectrocardiogramSample`.
|
|
20
20
|
*/
|
|
21
|
-
init(classification: ElectrocardiogramClassification, symptomsStatus: ElectrocardiogramSymptomsStatus, averageHeartRateBpm: Double?, samplingFrequencyHz: Double?, numberOfVoltageMeasurements: Double, voltages: [ElectrocardiogramVoltage]?, sampleType: SampleType, startDate: Date, endDate: Date, hasUndeterminedDuration: Bool,
|
|
21
|
+
init(classification: ElectrocardiogramClassification, symptomsStatus: ElectrocardiogramSymptomsStatus, averageHeartRateBpm: Double?, samplingFrequencyHz: Double?, numberOfVoltageMeasurements: Double, voltages: [ElectrocardiogramVoltage]?, sampleType: SampleType, startDate: Date, endDate: Date, hasUndeterminedDuration: Bool, uuid: String, sourceRevision: SourceRevision, device: Device?, metadata: AnyMap) {
|
|
22
22
|
self.init(classification, symptomsStatus, { () -> bridge.std__optional_double_ in
|
|
23
23
|
if let __unwrappedValue = averageHeartRateBpm {
|
|
24
24
|
return bridge.create_std__optional_double_(__unwrappedValue)
|
|
@@ -43,13 +43,13 @@ public extension ElectrocardiogramSample {
|
|
|
43
43
|
} else {
|
|
44
44
|
return .init()
|
|
45
45
|
}
|
|
46
|
-
}(), sampleType, startDate.toCpp(), endDate.toCpp(), hasUndeterminedDuration,
|
|
46
|
+
}(), sampleType, startDate.toCpp(), endDate.toCpp(), hasUndeterminedDuration, std.string(uuid), sourceRevision, { () -> bridge.std__optional_Device_ in
|
|
47
47
|
if let __unwrappedValue = device {
|
|
48
48
|
return bridge.create_std__optional_Device_(__unwrappedValue)
|
|
49
49
|
} else {
|
|
50
50
|
return .init()
|
|
51
51
|
}
|
|
52
|
-
}())
|
|
52
|
+
}(), metadata.cppPart)
|
|
53
53
|
}
|
|
54
54
|
|
|
55
55
|
@inline(__always)
|
|
@@ -123,11 +123,6 @@ public extension ElectrocardiogramSample {
|
|
|
123
123
|
return self.__hasUndeterminedDuration
|
|
124
124
|
}
|
|
125
125
|
|
|
126
|
-
@inline(__always)
|
|
127
|
-
var metadata: AnyMap {
|
|
128
|
-
return AnyMap(withCppPart: self.__metadata)
|
|
129
|
-
}
|
|
130
|
-
|
|
131
126
|
@inline(__always)
|
|
132
127
|
var uuid: String {
|
|
133
128
|
return String(self.__uuid)
|
|
@@ -142,4 +137,9 @@ public extension ElectrocardiogramSample {
|
|
|
142
137
|
var device: Device? {
|
|
143
138
|
return self.__device.value
|
|
144
139
|
}
|
|
140
|
+
|
|
141
|
+
@inline(__always)
|
|
142
|
+
var metadata: AnyMap {
|
|
143
|
+
return AnyMap(withCppPart: self.__metadata)
|
|
144
|
+
}
|
|
145
145
|
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// Func_void_std__unordered_map_std__string__std__chrono__system_clock__time_point_.swift
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
import NitroModules
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Wraps a Swift `(_ value: Dictionary<String, Date>) -> Void` as a class.
|
|
12
|
+
* This class can be used from C++, e.g. to wrap the Swift closure as a `std::function`.
|
|
13
|
+
*/
|
|
14
|
+
public final class Func_void_std__unordered_map_std__string__std__chrono__system_clock__time_point_ {
|
|
15
|
+
public typealias bridge = margelo.nitro.healthkit.bridge.swift
|
|
16
|
+
|
|
17
|
+
private let closure: (_ value: Dictionary<String, Date>) -> Void
|
|
18
|
+
|
|
19
|
+
public init(_ closure: @escaping (_ value: Dictionary<String, Date>) -> Void) {
|
|
20
|
+
self.closure = closure
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
@inline(__always)
|
|
24
|
+
public func call(value: bridge.std__unordered_map_std__string__std__chrono__system_clock__time_point_) -> Void {
|
|
25
|
+
self.closure({ () -> Dictionary<String, Date> in
|
|
26
|
+
var __dictionary = Dictionary<String, Date>(minimumCapacity: value.size())
|
|
27
|
+
let __keys = bridge.get_std__unordered_map_std__string__std__chrono__system_clock__time_point__keys(value)
|
|
28
|
+
for __key in __keys {
|
|
29
|
+
let __value = bridge.get_std__unordered_map_std__string__std__chrono__system_clock__time_point__value(value, __key)
|
|
30
|
+
__dictionary[String(__key)] = Date(fromChrono: __value)
|
|
31
|
+
}
|
|
32
|
+
return __dictionary
|
|
33
|
+
}())
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Casts this instance to a retained unsafe raw pointer.
|
|
38
|
+
* This acquires one additional strong reference on the object!
|
|
39
|
+
*/
|
|
40
|
+
@inline(__always)
|
|
41
|
+
public func toUnsafe() -> UnsafeMutableRawPointer {
|
|
42
|
+
return Unmanaged.passRetained(self).toOpaque()
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* Casts an unsafe pointer to a `Func_void_std__unordered_map_std__string__std__chrono__system_clock__time_point_`.
|
|
47
|
+
* The pointer has to be a retained opaque `Unmanaged<Func_void_std__unordered_map_std__string__std__chrono__system_clock__time_point_>`.
|
|
48
|
+
* This removes one strong reference from the object!
|
|
49
|
+
*/
|
|
50
|
+
@inline(__always)
|
|
51
|
+
public static func fromUnsafe(_ pointer: UnsafeMutableRawPointer) -> Func_void_std__unordered_map_std__string__std__chrono__system_clock__time_point_ {
|
|
52
|
+
return Unmanaged<Func_void_std__unordered_map_std__string__std__chrono__system_clock__time_point_>.fromOpaque(pointer).takeRetainedValue()
|
|
53
|
+
}
|
|
54
|
+
}
|
|
@@ -18,20 +18,20 @@ public extension HeartbeatSeriesSample {
|
|
|
18
18
|
/**
|
|
19
19
|
* Create a new instance of `HeartbeatSeriesSample`.
|
|
20
20
|
*/
|
|
21
|
-
init(heartbeats: [Heartbeat], sampleType: SampleType, startDate: Date, endDate: Date, hasUndeterminedDuration: Bool,
|
|
21
|
+
init(heartbeats: [Heartbeat], sampleType: SampleType, startDate: Date, endDate: Date, hasUndeterminedDuration: Bool, uuid: String, sourceRevision: SourceRevision, device: Device?, metadata: AnyMap) {
|
|
22
22
|
self.init({ () -> bridge.std__vector_Heartbeat_ in
|
|
23
23
|
var __vector = bridge.create_std__vector_Heartbeat_(heartbeats.count)
|
|
24
24
|
for __item in heartbeats {
|
|
25
25
|
__vector.push_back(__item)
|
|
26
26
|
}
|
|
27
27
|
return __vector
|
|
28
|
-
}(), sampleType, startDate.toCpp(), endDate.toCpp(), hasUndeterminedDuration,
|
|
28
|
+
}(), sampleType, startDate.toCpp(), endDate.toCpp(), hasUndeterminedDuration, std.string(uuid), sourceRevision, { () -> bridge.std__optional_Device_ in
|
|
29
29
|
if let __unwrappedValue = device {
|
|
30
30
|
return bridge.create_std__optional_Device_(__unwrappedValue)
|
|
31
31
|
} else {
|
|
32
32
|
return .init()
|
|
33
33
|
}
|
|
34
|
-
}())
|
|
34
|
+
}(), metadata.cppPart)
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
@inline(__always)
|
|
@@ -59,11 +59,6 @@ public extension HeartbeatSeriesSample {
|
|
|
59
59
|
return self.__hasUndeterminedDuration
|
|
60
60
|
}
|
|
61
61
|
|
|
62
|
-
@inline(__always)
|
|
63
|
-
var metadata: AnyMap {
|
|
64
|
-
return AnyMap(withCppPart: self.__metadata)
|
|
65
|
-
}
|
|
66
|
-
|
|
67
62
|
@inline(__always)
|
|
68
63
|
var uuid: String {
|
|
69
64
|
return String(self.__uuid)
|
|
@@ -78,4 +73,9 @@ public extension HeartbeatSeriesSample {
|
|
|
78
73
|
var device: Device? {
|
|
79
74
|
return self.__device.value
|
|
80
75
|
}
|
|
76
|
+
|
|
77
|
+
@inline(__always)
|
|
78
|
+
var metadata: AnyMap {
|
|
79
|
+
return AnyMap(withCppPart: self.__metadata)
|
|
80
|
+
}
|
|
81
81
|
}
|
|
@@ -34,6 +34,7 @@ public protocol HybridCoreModuleSpec_protocol: HybridObject {
|
|
|
34
34
|
func getRequestStatusForAuthorization(toCheck: AuthDataTypes) throws -> Promise<AuthorizationRequestStatus>
|
|
35
35
|
func requestAuthorization(toRequest: AuthDataTypes) throws -> Promise<Bool>
|
|
36
36
|
func requestPerObjectReadAuthorization(typeIdentifier: PerObjectTypeIdentifier) throws -> Promise<Void>
|
|
37
|
+
func getEarliestAuthorizedSampleDates(objectTypeIdentifiers: [ObjectTypeIdentifier]) throws -> Promise<Dictionary<String, Date>>
|
|
37
38
|
func deleteObjects(objectTypeIdentifier: SampleTypeIdentifierWriteable, filter: FilterForSamples) throws -> Promise<Double>
|
|
38
39
|
func isObjectTypeAvailable(objectTypeIdentifier: ObjectTypeIdentifier) throws -> Bool
|
|
39
40
|
func areObjectTypesAvailable(objectTypeIdentifiers: [ObjectTypeIdentifier]) throws -> Dictionary<String, Bool>
|
|
@@ -504,6 +504,31 @@ open class HybridCoreModuleSpec_cxx {
|
|
|
504
504
|
}
|
|
505
505
|
}
|
|
506
506
|
|
|
507
|
+
@inline(__always)
|
|
508
|
+
public final func getEarliestAuthorizedSampleDates(objectTypeIdentifiers: bridge.std__vector_ObjectTypeIdentifier_) -> bridge.Result_std__shared_ptr_Promise_std__unordered_map_std__string__std__chrono__system_clock__time_point____ {
|
|
509
|
+
do {
|
|
510
|
+
let __result = try self.__implementation.getEarliestAuthorizedSampleDates(objectTypeIdentifiers: objectTypeIdentifiers.map({ __item in __item }))
|
|
511
|
+
let __resultCpp = { () -> bridge.std__shared_ptr_Promise_std__unordered_map_std__string__std__chrono__system_clock__time_point___ in
|
|
512
|
+
let __promise = bridge.create_std__shared_ptr_Promise_std__unordered_map_std__string__std__chrono__system_clock__time_point___()
|
|
513
|
+
let __promiseHolder = bridge.wrap_std__shared_ptr_Promise_std__unordered_map_std__string__std__chrono__system_clock__time_point___(__promise)
|
|
514
|
+
__result
|
|
515
|
+
.then({ __result in __promiseHolder.resolve({ () -> bridge.std__unordered_map_std__string__std__chrono__system_clock__time_point_ in
|
|
516
|
+
var __map = bridge.create_std__unordered_map_std__string__std__chrono__system_clock__time_point_(__result.count)
|
|
517
|
+
for (__k, __v) in __result {
|
|
518
|
+
bridge.emplace_std__unordered_map_std__string__std__chrono__system_clock__time_point_(&__map, std.string(__k), __v.toCpp())
|
|
519
|
+
}
|
|
520
|
+
return __map
|
|
521
|
+
}()) })
|
|
522
|
+
.catch({ __error in __promiseHolder.reject(__error.toCpp()) })
|
|
523
|
+
return __promise
|
|
524
|
+
}()
|
|
525
|
+
return bridge.create_Result_std__shared_ptr_Promise_std__unordered_map_std__string__std__chrono__system_clock__time_point____(__resultCpp)
|
|
526
|
+
} catch (let __error) {
|
|
527
|
+
let __exceptionPtr = __error.toCpp()
|
|
528
|
+
return bridge.create_Result_std__shared_ptr_Promise_std__unordered_map_std__string__std__chrono__system_clock__time_point____(__exceptionPtr)
|
|
529
|
+
}
|
|
530
|
+
}
|
|
531
|
+
|
|
507
532
|
@inline(__always)
|
|
508
533
|
public final func deleteObjects(objectTypeIdentifier: Int32, filter: FilterForSamples) -> bridge.Result_std__shared_ptr_Promise_double___ {
|
|
509
534
|
do {
|
|
@@ -18,7 +18,7 @@ public extension MedicationDoseEvent {
|
|
|
18
18
|
/**
|
|
19
19
|
* Create a new instance of `MedicationDoseEvent`.
|
|
20
20
|
*/
|
|
21
|
-
init(scheduleType: MedicationDoseEventScheduleType, medicationConceptIdentifier: String, medicationDisplayText: String?, scheduledDate: Date?, scheduledDoseQuantity: Double?, doseQuantity: Double?, logStatus: MedicationDoseEventLogStatus, unit: String, sampleType: SampleType, startDate: Date, endDate: Date, hasUndeterminedDuration: Bool,
|
|
21
|
+
init(scheduleType: MedicationDoseEventScheduleType, medicationConceptIdentifier: String, medicationDisplayText: String?, scheduledDate: Date?, scheduledDoseQuantity: Double?, doseQuantity: Double?, logStatus: MedicationDoseEventLogStatus, unit: String, sampleType: SampleType, startDate: Date, endDate: Date, hasUndeterminedDuration: Bool, uuid: String, sourceRevision: SourceRevision, device: Device?, metadata: AnyMap) {
|
|
22
22
|
self.init(scheduleType, std.string(medicationConceptIdentifier), { () -> bridge.std__optional_std__string_ in
|
|
23
23
|
if let __unwrappedValue = medicationDisplayText {
|
|
24
24
|
return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
|
|
@@ -43,13 +43,13 @@ public extension MedicationDoseEvent {
|
|
|
43
43
|
} else {
|
|
44
44
|
return .init()
|
|
45
45
|
}
|
|
46
|
-
}(), logStatus, std.string(unit), sampleType, startDate.toCpp(), endDate.toCpp(), hasUndeterminedDuration,
|
|
46
|
+
}(), logStatus, std.string(unit), sampleType, startDate.toCpp(), endDate.toCpp(), hasUndeterminedDuration, std.string(uuid), sourceRevision, { () -> bridge.std__optional_Device_ in
|
|
47
47
|
if let __unwrappedValue = device {
|
|
48
48
|
return bridge.create_std__optional_Device_(__unwrappedValue)
|
|
49
49
|
} else {
|
|
50
50
|
return .init()
|
|
51
51
|
}
|
|
52
|
-
}())
|
|
52
|
+
}(), metadata.cppPart)
|
|
53
53
|
}
|
|
54
54
|
|
|
55
55
|
@inline(__always)
|
|
@@ -140,11 +140,6 @@ public extension MedicationDoseEvent {
|
|
|
140
140
|
return self.__hasUndeterminedDuration
|
|
141
141
|
}
|
|
142
142
|
|
|
143
|
-
@inline(__always)
|
|
144
|
-
var metadata: AnyMap {
|
|
145
|
-
return AnyMap(withCppPart: self.__metadata)
|
|
146
|
-
}
|
|
147
|
-
|
|
148
143
|
@inline(__always)
|
|
149
144
|
var uuid: String {
|
|
150
145
|
return String(self.__uuid)
|
|
@@ -159,4 +154,9 @@ public extension MedicationDoseEvent {
|
|
|
159
154
|
var device: Device? {
|
|
160
155
|
return self.__device.value
|
|
161
156
|
}
|
|
157
|
+
|
|
158
|
+
@inline(__always)
|
|
159
|
+
var metadata: AnyMap {
|
|
160
|
+
return AnyMap(withCppPart: self.__metadata)
|
|
161
|
+
}
|
|
162
162
|
}
|
|
@@ -39,6 +39,8 @@ public extension ObjectTypeIdentifier {
|
|
|
39
39
|
self = .hkcategorytypeidentifieraudioexposureevent
|
|
40
40
|
case "HKCategoryTypeIdentifierBladderIncontinence":
|
|
41
41
|
self = .hkcategorytypeidentifierbladderincontinence
|
|
42
|
+
case "HKCategoryTypeIdentifierBleedingAfterMenopause":
|
|
43
|
+
self = .hkcategorytypeidentifierbleedingaftermenopause
|
|
42
44
|
case "HKCategoryTypeIdentifierBleedingAfterPregnancy":
|
|
43
45
|
self = .hkcategorytypeidentifierbleedingafterpregnancy
|
|
44
46
|
case "HKCategoryTypeIdentifierBleedingDuringPregnancy":
|
|
@@ -105,6 +107,8 @@ public extension ObjectTypeIdentifier {
|
|
|
105
107
|
self = .hkcategorytypeidentifierlowerbackpain
|
|
106
108
|
case "HKCategoryTypeIdentifierMemoryLapse":
|
|
107
109
|
self = .hkcategorytypeidentifiermemorylapse
|
|
110
|
+
case "HKCategoryTypeIdentifierMenopausalState":
|
|
111
|
+
self = .hkcategorytypeidentifiermenopausalstate
|
|
108
112
|
case "HKCategoryTypeIdentifierMenstrualFlow":
|
|
109
113
|
self = .hkcategorytypeidentifiermenstrualflow
|
|
110
114
|
case "HKCategoryTypeIdentifierMindfulSession":
|
|
@@ -199,8 +203,6 @@ public extension ObjectTypeIdentifier {
|
|
|
199
203
|
self = .hkquantitytypeidentifierbloodalcoholcontent
|
|
200
204
|
case "HKQuantityTypeIdentifierBloodGlucose":
|
|
201
205
|
self = .hkquantitytypeidentifierbloodglucose
|
|
202
|
-
case "HKQuantityTypeIdentifierBloodKetones":
|
|
203
|
-
self = .hkquantitytypeidentifierbloodketones
|
|
204
206
|
case "HKQuantityTypeIdentifierBloodPressureDiastolic":
|
|
205
207
|
self = .hkquantitytypeidentifierbloodpressurediastolic
|
|
206
208
|
case "HKQuantityTypeIdentifierBloodPressureSystolic":
|
|
@@ -339,6 +341,8 @@ public extension ObjectTypeIdentifier {
|
|
|
339
341
|
self = .hkquantitytypeidentifierheartrate
|
|
340
342
|
case "HKQuantityTypeIdentifierHeartRateRecoveryOneMinute":
|
|
341
343
|
self = .hkquantitytypeidentifierheartraterecoveryoneminute
|
|
344
|
+
case "HKQuantityTypeIdentifierHeartRateVariabilityRMSSD":
|
|
345
|
+
self = .hkquantitytypeidentifierheartratevariabilityrmssd
|
|
342
346
|
case "HKQuantityTypeIdentifierHeartRateVariabilitySDNN":
|
|
343
347
|
self = .hkquantitytypeidentifierheartratevariabilitysdnn
|
|
344
348
|
case "HKQuantityTypeIdentifierHeight":
|
|
@@ -461,6 +465,8 @@ public extension ObjectTypeIdentifier {
|
|
|
461
465
|
return "HKCategoryTypeIdentifierAudioExposureEvent"
|
|
462
466
|
case .hkcategorytypeidentifierbladderincontinence:
|
|
463
467
|
return "HKCategoryTypeIdentifierBladderIncontinence"
|
|
468
|
+
case .hkcategorytypeidentifierbleedingaftermenopause:
|
|
469
|
+
return "HKCategoryTypeIdentifierBleedingAfterMenopause"
|
|
464
470
|
case .hkcategorytypeidentifierbleedingafterpregnancy:
|
|
465
471
|
return "HKCategoryTypeIdentifierBleedingAfterPregnancy"
|
|
466
472
|
case .hkcategorytypeidentifierbleedingduringpregnancy:
|
|
@@ -527,6 +533,8 @@ public extension ObjectTypeIdentifier {
|
|
|
527
533
|
return "HKCategoryTypeIdentifierLowerBackPain"
|
|
528
534
|
case .hkcategorytypeidentifiermemorylapse:
|
|
529
535
|
return "HKCategoryTypeIdentifierMemoryLapse"
|
|
536
|
+
case .hkcategorytypeidentifiermenopausalstate:
|
|
537
|
+
return "HKCategoryTypeIdentifierMenopausalState"
|
|
530
538
|
case .hkcategorytypeidentifiermenstrualflow:
|
|
531
539
|
return "HKCategoryTypeIdentifierMenstrualFlow"
|
|
532
540
|
case .hkcategorytypeidentifiermindfulsession:
|
|
@@ -621,8 +629,6 @@ public extension ObjectTypeIdentifier {
|
|
|
621
629
|
return "HKQuantityTypeIdentifierBloodAlcoholContent"
|
|
622
630
|
case .hkquantitytypeidentifierbloodglucose:
|
|
623
631
|
return "HKQuantityTypeIdentifierBloodGlucose"
|
|
624
|
-
case .hkquantitytypeidentifierbloodketones:
|
|
625
|
-
return "HKQuantityTypeIdentifierBloodKetones"
|
|
626
632
|
case .hkquantitytypeidentifierbloodpressurediastolic:
|
|
627
633
|
return "HKQuantityTypeIdentifierBloodPressureDiastolic"
|
|
628
634
|
case .hkquantitytypeidentifierbloodpressuresystolic:
|
|
@@ -761,6 +767,8 @@ public extension ObjectTypeIdentifier {
|
|
|
761
767
|
return "HKQuantityTypeIdentifierHeartRate"
|
|
762
768
|
case .hkquantitytypeidentifierheartraterecoveryoneminute:
|
|
763
769
|
return "HKQuantityTypeIdentifierHeartRateRecoveryOneMinute"
|
|
770
|
+
case .hkquantitytypeidentifierheartratevariabilityrmssd:
|
|
771
|
+
return "HKQuantityTypeIdentifierHeartRateVariabilityRMSSD"
|
|
764
772
|
case .hkquantitytypeidentifierheartratevariabilitysdnn:
|
|
765
773
|
return "HKQuantityTypeIdentifierHeartRateVariabilitySDNN"
|
|
766
774
|
case .hkquantitytypeidentifierheight:
|
|
@@ -18,14 +18,14 @@ public extension QuantitySample {
|
|
|
18
18
|
/**
|
|
19
19
|
* Create a new instance of `QuantitySample`.
|
|
20
20
|
*/
|
|
21
|
-
init(quantityType: QuantityTypeIdentifier, quantity: Double, unit: String, sampleType: SampleType, startDate: Date, endDate: Date, hasUndeterminedDuration: Bool,
|
|
22
|
-
self.init(quantityType, quantity, std.string(unit), sampleType, startDate.toCpp(), endDate.toCpp(), hasUndeterminedDuration,
|
|
21
|
+
init(quantityType: QuantityTypeIdentifier, quantity: Double, unit: String, sampleType: SampleType, startDate: Date, endDate: Date, hasUndeterminedDuration: Bool, uuid: String, sourceRevision: SourceRevision, device: Device?, metadata: AnyMap) {
|
|
22
|
+
self.init(quantityType, quantity, std.string(unit), sampleType, startDate.toCpp(), endDate.toCpp(), hasUndeterminedDuration, std.string(uuid), sourceRevision, { () -> bridge.std__optional_Device_ in
|
|
23
23
|
if let __unwrappedValue = device {
|
|
24
24
|
return bridge.create_std__optional_Device_(__unwrappedValue)
|
|
25
25
|
} else {
|
|
26
26
|
return .init()
|
|
27
27
|
}
|
|
28
|
-
}())
|
|
28
|
+
}(), metadata.cppPart)
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
@inline(__always)
|
|
@@ -63,11 +63,6 @@ public extension QuantitySample {
|
|
|
63
63
|
return self.__hasUndeterminedDuration
|
|
64
64
|
}
|
|
65
65
|
|
|
66
|
-
@inline(__always)
|
|
67
|
-
var metadata: AnyMap {
|
|
68
|
-
return AnyMap(withCppPart: self.__metadata)
|
|
69
|
-
}
|
|
70
|
-
|
|
71
66
|
@inline(__always)
|
|
72
67
|
var uuid: String {
|
|
73
68
|
return String(self.__uuid)
|
|
@@ -82,4 +77,9 @@ public extension QuantitySample {
|
|
|
82
77
|
var device: Device? {
|
|
83
78
|
return self.__device.value
|
|
84
79
|
}
|
|
80
|
+
|
|
81
|
+
@inline(__always)
|
|
82
|
+
var metadata: AnyMap {
|
|
83
|
+
return AnyMap(withCppPart: self.__metadata)
|
|
84
|
+
}
|
|
85
85
|
}
|