@kingstinct/react-native-healthkit 11.1.0 → 11.1.1
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/ElectrocardiogramModule.swift +3 -1
- package/nitrogen/generated/ios/ReactNativeHealthkit-Swift-Cxx-Bridge.cpp +54 -54
- package/nitrogen/generated/ios/ReactNativeHealthkit-Swift-Cxx-Bridge.hpp +85 -78
- package/nitrogen/generated/ios/c++/HybridCategoryTypeModuleSpecSwift.hpp +1 -1
- package/nitrogen/generated/ios/c++/HybridElectrocardiogramModuleSpecSwift.hpp +1 -1
- package/nitrogen/generated/ios/c++/HybridHeartbeatSeriesModuleSpecSwift.hpp +1 -1
- package/nitrogen/generated/ios/c++/HybridQuantityTypeModuleSpecSwift.hpp +2 -2
- package/nitrogen/generated/ios/c++/HybridWorkoutProxySpecSwift.hpp +1 -2
- package/nitrogen/generated/ios/c++/HybridWorkoutsModuleSpecSwift.hpp +4 -4
- package/nitrogen/generated/ios/swift/CategorySample.swift +2 -16
- package/nitrogen/generated/ios/swift/CategorySampleForSaving.swift +1 -8
- package/nitrogen/generated/ios/swift/ElectrocardiogramSample.swift +2 -16
- package/nitrogen/generated/ios/swift/Func_void_std__optional_QueryStatisticsResponse_.swift +1 -8
- package/nitrogen/generated/ios/swift/Func_void_std__optional_WorkoutPlan_.swift +1 -8
- package/nitrogen/generated/ios/swift/HeartbeatSeriesSample.swift +2 -16
- package/nitrogen/generated/ios/swift/HybridCategoryTypeModuleSpec_cxx.swift +1 -8
- package/nitrogen/generated/ios/swift/HybridCoreModuleSpec_cxx.swift +33 -5
- package/nitrogen/generated/ios/swift/HybridElectrocardiogramModuleSpec_cxx.swift +1 -8
- package/nitrogen/generated/ios/swift/HybridHeartbeatSeriesModuleSpec_cxx.swift +1 -8
- package/nitrogen/generated/ios/swift/HybridQuantityTypeModuleSpec_cxx.swift +11 -24
- package/nitrogen/generated/ios/swift/HybridStateOfMindModuleSpec_cxx.swift +10 -9
- package/nitrogen/generated/ios/swift/QuantitySample.swift +2 -16
- package/nitrogen/generated/ios/swift/QuantitySampleForSaving.swift +1 -8
- package/nitrogen/generated/ios/swift/QueryStatisticsResponse.swift +7 -56
- package/nitrogen/generated/ios/swift/StateOfMindSample.swift +23 -45
- package/nitrogen/generated/ios/swift/WorkoutSample.swift +2 -16
- package/nitrogen/generated/shared/c++/CategorySample.hpp +8 -0
- package/nitrogen/generated/shared/c++/CategorySampleForSaving.hpp +8 -0
- package/nitrogen/generated/shared/c++/CategorySamplesWithAnchorResponse.hpp +8 -0
- package/nitrogen/generated/shared/c++/CorrelationSample.hpp +8 -0
- package/nitrogen/generated/shared/c++/DeletedSample.hpp +8 -0
- package/nitrogen/generated/shared/c++/Device.hpp +8 -0
- package/nitrogen/generated/shared/c++/ECGQueryOptionsWithAnchor.hpp +8 -0
- package/nitrogen/generated/shared/c++/ECGQueryOptionsWithSortOrder.hpp +8 -0
- package/nitrogen/generated/shared/c++/ElectrocardiogramSample.hpp +8 -0
- package/nitrogen/generated/shared/c++/ElectrocardiogramSamplesWithAnchorResponse.hpp +8 -0
- package/nitrogen/generated/shared/c++/ElectrocardiogramVoltage.hpp +8 -0
- package/nitrogen/generated/shared/c++/FilterForSamplesAnd.hpp +8 -0
- package/nitrogen/generated/shared/c++/FilterForSamplesOr.hpp +8 -0
- package/nitrogen/generated/shared/c++/Heartbeat.hpp +8 -0
- package/nitrogen/generated/shared/c++/HeartbeatSeriesSample.hpp +8 -0
- package/nitrogen/generated/shared/c++/HeartbeatSeriesSamplesWithAnchorResponse.hpp +8 -0
- package/nitrogen/generated/shared/c++/IdentifierWithUnit.hpp +8 -0
- package/nitrogen/generated/shared/c++/IntervalComponents.hpp +8 -0
- package/nitrogen/generated/shared/c++/LocationForSaving.hpp +8 -0
- package/nitrogen/generated/shared/c++/OnChangeCallbackArgs.hpp +8 -0
- package/nitrogen/generated/shared/c++/PredicateForWorkoutsAnd.hpp +8 -0
- package/nitrogen/generated/shared/c++/PredicateForWorkoutsOr.hpp +8 -0
- package/nitrogen/generated/shared/c++/PredicateFromWorkout.hpp +8 -0
- package/nitrogen/generated/shared/c++/PredicateWithMetadataKey.hpp +8 -0
- package/nitrogen/generated/shared/c++/PredicateWithStartAndEnd.hpp +8 -0
- package/nitrogen/generated/shared/c++/PredicateWithUUID.hpp +8 -0
- package/nitrogen/generated/shared/c++/PredicateWithUUIDs.hpp +8 -0
- package/nitrogen/generated/shared/c++/Quantity.hpp +8 -0
- package/nitrogen/generated/shared/c++/QuantityDateInterval.hpp +8 -0
- package/nitrogen/generated/shared/c++/QuantitySample.hpp +8 -0
- package/nitrogen/generated/shared/c++/QuantitySampleForSaving.hpp +8 -0
- package/nitrogen/generated/shared/c++/QuantitySamplesWithAnchorResponse.hpp +8 -0
- package/nitrogen/generated/shared/c++/QueryOptionsWithAnchor.hpp +8 -0
- package/nitrogen/generated/shared/c++/QueryOptionsWithAnchorAndUnit.hpp +8 -0
- package/nitrogen/generated/shared/c++/QueryOptionsWithSortOrder.hpp +8 -0
- package/nitrogen/generated/shared/c++/QueryOptionsWithSortOrderAndUnit.hpp +8 -0
- package/nitrogen/generated/shared/c++/QueryStatisticsResponse.hpp +8 -0
- package/nitrogen/generated/shared/c++/QueryWorkoutSamplesWithAnchorResponse.hpp +8 -0
- package/nitrogen/generated/shared/c++/Source.hpp +8 -0
- package/nitrogen/generated/shared/c++/SourceRevision.hpp +8 -0
- package/nitrogen/generated/shared/c++/StateOfMindSample.hpp +8 -0
- package/nitrogen/generated/shared/c++/StatisticsQueryOptions.hpp +8 -0
- package/nitrogen/generated/shared/c++/WorkoutActivity.hpp +8 -0
- package/nitrogen/generated/shared/c++/WorkoutActivityTypePredicate.hpp +8 -0
- package/nitrogen/generated/shared/c++/WorkoutConfiguration.hpp +8 -0
- package/nitrogen/generated/shared/c++/WorkoutDurationPredicate.hpp +8 -0
- package/nitrogen/generated/shared/c++/WorkoutEvent.hpp +8 -0
- package/nitrogen/generated/shared/c++/WorkoutPlan.hpp +8 -0
- package/nitrogen/generated/shared/c++/WorkoutQueryOptions.hpp +8 -0
- package/nitrogen/generated/shared/c++/WorkoutQueryOptionsWithAnchor.hpp +8 -0
- package/nitrogen/generated/shared/c++/WorkoutRoute.hpp +8 -0
- package/nitrogen/generated/shared/c++/WorkoutRouteLocation.hpp +8 -0
- package/nitrogen/generated/shared/c++/WorkoutSample.hpp +8 -0
- package/nitrogen/generated/shared/c++/WorkoutTotals.hpp +8 -0
- package/package.json +5 -5
|
@@ -48,14 +48,7 @@ public extension CategorySample {
|
|
|
48
48
|
var device: Device? {
|
|
49
49
|
@inline(__always)
|
|
50
50
|
get {
|
|
51
|
-
return
|
|
52
|
-
if bridge.has_value_std__optional_Device_(self.__device) {
|
|
53
|
-
let __unwrapped = bridge.get_std__optional_Device_(self.__device)
|
|
54
|
-
return __unwrapped
|
|
55
|
-
} else {
|
|
56
|
-
return nil
|
|
57
|
-
}
|
|
58
|
-
}()
|
|
51
|
+
return self.__device.value
|
|
59
52
|
}
|
|
60
53
|
@inline(__always)
|
|
61
54
|
set {
|
|
@@ -127,14 +120,7 @@ public extension CategorySample {
|
|
|
127
120
|
var sourceRevision: SourceRevision? {
|
|
128
121
|
@inline(__always)
|
|
129
122
|
get {
|
|
130
|
-
return
|
|
131
|
-
if bridge.has_value_std__optional_SourceRevision_(self.__sourceRevision) {
|
|
132
|
-
let __unwrapped = bridge.get_std__optional_SourceRevision_(self.__sourceRevision)
|
|
133
|
-
return __unwrapped
|
|
134
|
-
} else {
|
|
135
|
-
return nil
|
|
136
|
-
}
|
|
137
|
-
}()
|
|
123
|
+
return self.__sourceRevision.value
|
|
138
124
|
}
|
|
139
125
|
@inline(__always)
|
|
140
126
|
set {
|
|
@@ -86,14 +86,7 @@ public extension CategorySampleForSaving {
|
|
|
86
86
|
var sourceRevision: SourceRevision? {
|
|
87
87
|
@inline(__always)
|
|
88
88
|
get {
|
|
89
|
-
return
|
|
90
|
-
if bridge.has_value_std__optional_SourceRevision_(self.__sourceRevision) {
|
|
91
|
-
let __unwrapped = bridge.get_std__optional_SourceRevision_(self.__sourceRevision)
|
|
92
|
-
return __unwrapped
|
|
93
|
-
} else {
|
|
94
|
-
return nil
|
|
95
|
-
}
|
|
96
|
-
}()
|
|
89
|
+
return self.__sourceRevision.value
|
|
97
90
|
}
|
|
98
91
|
@inline(__always)
|
|
99
92
|
set {
|
|
@@ -84,14 +84,7 @@ public extension ElectrocardiogramSample {
|
|
|
84
84
|
var device: Device? {
|
|
85
85
|
@inline(__always)
|
|
86
86
|
get {
|
|
87
|
-
return
|
|
88
|
-
if bridge.has_value_std__optional_Device_(self.__device) {
|
|
89
|
-
let __unwrapped = bridge.get_std__optional_Device_(self.__device)
|
|
90
|
-
return __unwrapped
|
|
91
|
-
} else {
|
|
92
|
-
return nil
|
|
93
|
-
}
|
|
94
|
-
}()
|
|
87
|
+
return self.__device.value
|
|
95
88
|
}
|
|
96
89
|
@inline(__always)
|
|
97
90
|
set {
|
|
@@ -275,14 +268,7 @@ public extension ElectrocardiogramSample {
|
|
|
275
268
|
var sourceRevision: SourceRevision? {
|
|
276
269
|
@inline(__always)
|
|
277
270
|
get {
|
|
278
|
-
return
|
|
279
|
-
if bridge.has_value_std__optional_SourceRevision_(self.__sourceRevision) {
|
|
280
|
-
let __unwrapped = bridge.get_std__optional_SourceRevision_(self.__sourceRevision)
|
|
281
|
-
return __unwrapped
|
|
282
|
-
} else {
|
|
283
|
-
return nil
|
|
284
|
-
}
|
|
285
|
-
}()
|
|
271
|
+
return self.__sourceRevision.value
|
|
286
272
|
}
|
|
287
273
|
@inline(__always)
|
|
288
274
|
set {
|
|
@@ -23,14 +23,7 @@ public final class Func_void_std__optional_QueryStatisticsResponse_ {
|
|
|
23
23
|
|
|
24
24
|
@inline(__always)
|
|
25
25
|
public func call(value: bridge.std__optional_QueryStatisticsResponse_) -> Void {
|
|
26
|
-
self.closure(
|
|
27
|
-
if bridge.has_value_std__optional_QueryStatisticsResponse_(value) {
|
|
28
|
-
let __unwrapped = bridge.get_std__optional_QueryStatisticsResponse_(value)
|
|
29
|
-
return __unwrapped
|
|
30
|
-
} else {
|
|
31
|
-
return nil
|
|
32
|
-
}
|
|
33
|
-
}())
|
|
26
|
+
self.closure(value.value)
|
|
34
27
|
}
|
|
35
28
|
|
|
36
29
|
/**
|
|
@@ -23,14 +23,7 @@ public final class Func_void_std__optional_WorkoutPlan_ {
|
|
|
23
23
|
|
|
24
24
|
@inline(__always)
|
|
25
25
|
public func call(value: bridge.std__optional_WorkoutPlan_) -> Void {
|
|
26
|
-
self.closure(
|
|
27
|
-
if bridge.has_value_std__optional_WorkoutPlan_(value) {
|
|
28
|
-
let __unwrapped = bridge.get_std__optional_WorkoutPlan_(value)
|
|
29
|
-
return __unwrapped
|
|
30
|
-
} else {
|
|
31
|
-
return nil
|
|
32
|
-
}
|
|
33
|
-
}())
|
|
26
|
+
self.closure(value.value)
|
|
34
27
|
}
|
|
35
28
|
|
|
36
29
|
/**
|
|
@@ -60,14 +60,7 @@ public extension HeartbeatSeriesSample {
|
|
|
60
60
|
var device: Device? {
|
|
61
61
|
@inline(__always)
|
|
62
62
|
get {
|
|
63
|
-
return
|
|
64
|
-
if bridge.has_value_std__optional_Device_(self.__device) {
|
|
65
|
-
let __unwrapped = bridge.get_std__optional_Device_(self.__device)
|
|
66
|
-
return __unwrapped
|
|
67
|
-
} else {
|
|
68
|
-
return nil
|
|
69
|
-
}
|
|
70
|
-
}()
|
|
63
|
+
return self.__device.value
|
|
71
64
|
}
|
|
72
65
|
@inline(__always)
|
|
73
66
|
set {
|
|
@@ -147,14 +140,7 @@ public extension HeartbeatSeriesSample {
|
|
|
147
140
|
var sourceRevision: SourceRevision? {
|
|
148
141
|
@inline(__always)
|
|
149
142
|
get {
|
|
150
|
-
return
|
|
151
|
-
if bridge.has_value_std__optional_SourceRevision_(self.__sourceRevision) {
|
|
152
|
-
let __unwrapped = bridge.get_std__optional_SourceRevision_(self.__sourceRevision)
|
|
153
|
-
return __unwrapped
|
|
154
|
-
} else {
|
|
155
|
-
return nil
|
|
156
|
-
}
|
|
157
|
-
}()
|
|
143
|
+
return self.__sourceRevision.value
|
|
158
144
|
}
|
|
159
145
|
@inline(__always)
|
|
160
146
|
set {
|
|
@@ -131,14 +131,7 @@ open class HybridCategoryTypeModuleSpec_cxx {
|
|
|
131
131
|
@inline(__always)
|
|
132
132
|
public final func queryCategorySamples(identifier: Int32, options: bridge.std__optional_QueryOptionsWithSortOrder_) -> bridge.Result_std__shared_ptr_Promise_std__vector_CategorySample____ {
|
|
133
133
|
do {
|
|
134
|
-
let __result = try self.__implementation.queryCategorySamples(identifier: margelo.nitro.healthkit.CategoryTypeIdentifier(rawValue: identifier)!, options:
|
|
135
|
-
if bridge.has_value_std__optional_QueryOptionsWithSortOrder_(options) {
|
|
136
|
-
let __unwrapped = bridge.get_std__optional_QueryOptionsWithSortOrder_(options)
|
|
137
|
-
return __unwrapped
|
|
138
|
-
} else {
|
|
139
|
-
return nil
|
|
140
|
-
}
|
|
141
|
-
}())
|
|
134
|
+
let __result = try self.__implementation.queryCategorySamples(identifier: margelo.nitro.healthkit.CategoryTypeIdentifier(rawValue: identifier)!, options: options.value)
|
|
142
135
|
let __resultCpp = { () -> bridge.std__shared_ptr_Promise_std__vector_CategorySample___ in
|
|
143
136
|
let __promise = bridge.create_std__shared_ptr_Promise_std__vector_CategorySample___()
|
|
144
137
|
let __promiseHolder = bridge.wrap_std__shared_ptr_Promise_std__vector_CategorySample___(__promise)
|
|
@@ -231,7 +231,11 @@ open class HybridCoreModuleSpec_cxx {
|
|
|
231
231
|
@inline(__always)
|
|
232
232
|
public final func getPreferredUnits(identifiers: bridge.std__vector_QuantityTypeIdentifier_, forceUpdate: bridge.std__optional_bool_) -> bridge.Result_std__shared_ptr_Promise_std__vector_IdentifierWithUnit____ {
|
|
233
233
|
do {
|
|
234
|
-
let __result = try self.__implementation.getPreferredUnits(identifiers:
|
|
234
|
+
let __result = try self.__implementation.getPreferredUnits(identifiers: { () -> [QuantityTypeIdentifier] in
|
|
235
|
+
let __data = bridge.get_data_std__vector_QuantityTypeIdentifier_(identifiers)
|
|
236
|
+
let __size = identifiers.size()
|
|
237
|
+
return Array(UnsafeBufferPointer(start: __data, count: __size))
|
|
238
|
+
}(), forceUpdate: forceUpdate.value)
|
|
235
239
|
let __resultCpp = { () -> bridge.std__shared_ptr_Promise_std__vector_IdentifierWithUnit___ in
|
|
236
240
|
let __promise = bridge.create_std__shared_ptr_Promise_std__vector_IdentifierWithUnit___()
|
|
237
241
|
let __promiseHolder = bridge.wrap_std__shared_ptr_Promise_std__vector_IdentifierWithUnit___(__promise)
|
|
@@ -375,7 +379,15 @@ open class HybridCoreModuleSpec_cxx {
|
|
|
375
379
|
@inline(__always)
|
|
376
380
|
public final func getRequestStatusForAuthorization(toShare: bridge.std__vector_SampleTypeIdentifierWriteable_, toRead: bridge.std__vector_ObjectTypeIdentifier_) -> bridge.Result_std__shared_ptr_Promise_AuthorizationRequestStatus___ {
|
|
377
381
|
do {
|
|
378
|
-
let __result = try self.__implementation.getRequestStatusForAuthorization(toShare:
|
|
382
|
+
let __result = try self.__implementation.getRequestStatusForAuthorization(toShare: { () -> [SampleTypeIdentifierWriteable] in
|
|
383
|
+
let __data = bridge.get_data_std__vector_SampleTypeIdentifierWriteable_(toShare)
|
|
384
|
+
let __size = toShare.size()
|
|
385
|
+
return Array(UnsafeBufferPointer(start: __data, count: __size))
|
|
386
|
+
}(), toRead: { () -> [ObjectTypeIdentifier] in
|
|
387
|
+
let __data = bridge.get_data_std__vector_ObjectTypeIdentifier_(toRead)
|
|
388
|
+
let __size = toRead.size()
|
|
389
|
+
return Array(UnsafeBufferPointer(start: __data, count: __size))
|
|
390
|
+
}())
|
|
379
391
|
let __resultCpp = { () -> bridge.std__shared_ptr_Promise_AuthorizationRequestStatus__ in
|
|
380
392
|
let __promise = bridge.create_std__shared_ptr_Promise_AuthorizationRequestStatus__()
|
|
381
393
|
let __promiseHolder = bridge.wrap_std__shared_ptr_Promise_AuthorizationRequestStatus__(__promise)
|
|
@@ -394,7 +406,15 @@ open class HybridCoreModuleSpec_cxx {
|
|
|
394
406
|
@inline(__always)
|
|
395
407
|
public final func requestAuthorization(toShare: bridge.std__vector_SampleTypeIdentifierWriteable_, toRead: bridge.std__vector_ObjectTypeIdentifier_) -> bridge.Result_std__shared_ptr_Promise_bool___ {
|
|
396
408
|
do {
|
|
397
|
-
let __result = try self.__implementation.requestAuthorization(toShare:
|
|
409
|
+
let __result = try self.__implementation.requestAuthorization(toShare: { () -> [SampleTypeIdentifierWriteable] in
|
|
410
|
+
let __data = bridge.get_data_std__vector_SampleTypeIdentifierWriteable_(toShare)
|
|
411
|
+
let __size = toShare.size()
|
|
412
|
+
return Array(UnsafeBufferPointer(start: __data, count: __size))
|
|
413
|
+
}(), toRead: { () -> [ObjectTypeIdentifier] in
|
|
414
|
+
let __data = bridge.get_data_std__vector_ObjectTypeIdentifier_(toRead)
|
|
415
|
+
let __size = toRead.size()
|
|
416
|
+
return Array(UnsafeBufferPointer(start: __data, count: __size))
|
|
417
|
+
}())
|
|
398
418
|
let __resultCpp = { () -> bridge.std__shared_ptr_Promise_bool__ in
|
|
399
419
|
let __promise = bridge.create_std__shared_ptr_Promise_bool__()
|
|
400
420
|
let __promiseHolder = bridge.wrap_std__shared_ptr_Promise_bool__(__promise)
|
|
@@ -471,7 +491,11 @@ open class HybridCoreModuleSpec_cxx {
|
|
|
471
491
|
@inline(__always)
|
|
472
492
|
public final func areObjectTypesAvailable(objectTypeIdentifiers: bridge.std__vector_ObjectTypeIdentifier_) -> bridge.Result_std__unordered_map_std__string__bool__ {
|
|
473
493
|
do {
|
|
474
|
-
let __result = try self.__implementation.areObjectTypesAvailable(objectTypeIdentifiers:
|
|
494
|
+
let __result = try self.__implementation.areObjectTypesAvailable(objectTypeIdentifiers: { () -> [ObjectTypeIdentifier] in
|
|
495
|
+
let __data = bridge.get_data_std__vector_ObjectTypeIdentifier_(objectTypeIdentifiers)
|
|
496
|
+
let __size = objectTypeIdentifiers.size()
|
|
497
|
+
return Array(UnsafeBufferPointer(start: __data, count: __size))
|
|
498
|
+
}())
|
|
475
499
|
let __resultCpp = { () -> bridge.std__unordered_map_std__string__bool_ in
|
|
476
500
|
var __map = bridge.create_std__unordered_map_std__string__bool_(__result.count)
|
|
477
501
|
for (__k, __v) in __result {
|
|
@@ -489,7 +513,11 @@ open class HybridCoreModuleSpec_cxx {
|
|
|
489
513
|
@inline(__always)
|
|
490
514
|
public final func areObjectTypesAvailableAsync(objectTypeIdentifiers: bridge.std__vector_ObjectTypeIdentifier_) -> bridge.Result_std__shared_ptr_Promise_std__unordered_map_std__string__bool____ {
|
|
491
515
|
do {
|
|
492
|
-
let __result = try self.__implementation.areObjectTypesAvailableAsync(objectTypeIdentifiers:
|
|
516
|
+
let __result = try self.__implementation.areObjectTypesAvailableAsync(objectTypeIdentifiers: { () -> [ObjectTypeIdentifier] in
|
|
517
|
+
let __data = bridge.get_data_std__vector_ObjectTypeIdentifier_(objectTypeIdentifiers)
|
|
518
|
+
let __size = objectTypeIdentifiers.size()
|
|
519
|
+
return Array(UnsafeBufferPointer(start: __data, count: __size))
|
|
520
|
+
}())
|
|
493
521
|
let __resultCpp = { () -> bridge.std__shared_ptr_Promise_std__unordered_map_std__string__bool___ in
|
|
494
522
|
let __promise = bridge.create_std__shared_ptr_Promise_std__unordered_map_std__string__bool___()
|
|
495
523
|
let __promiseHolder = bridge.wrap_std__shared_ptr_Promise_std__unordered_map_std__string__bool___(__promise)
|
|
@@ -112,14 +112,7 @@ open class HybridElectrocardiogramModuleSpec_cxx {
|
|
|
112
112
|
@inline(__always)
|
|
113
113
|
public final func queryElectrocardiogramSamples(options: bridge.std__optional_ECGQueryOptionsWithSortOrder_) -> bridge.Result_std__shared_ptr_Promise_std__vector_ElectrocardiogramSample____ {
|
|
114
114
|
do {
|
|
115
|
-
let __result = try self.__implementation.queryElectrocardiogramSamples(options:
|
|
116
|
-
if bridge.has_value_std__optional_ECGQueryOptionsWithSortOrder_(options) {
|
|
117
|
-
let __unwrapped = bridge.get_std__optional_ECGQueryOptionsWithSortOrder_(options)
|
|
118
|
-
return __unwrapped
|
|
119
|
-
} else {
|
|
120
|
-
return nil
|
|
121
|
-
}
|
|
122
|
-
}())
|
|
115
|
+
let __result = try self.__implementation.queryElectrocardiogramSamples(options: options.value)
|
|
123
116
|
let __resultCpp = { () -> bridge.std__shared_ptr_Promise_std__vector_ElectrocardiogramSample___ in
|
|
124
117
|
let __promise = bridge.create_std__shared_ptr_Promise_std__vector_ElectrocardiogramSample___()
|
|
125
118
|
let __promiseHolder = bridge.wrap_std__shared_ptr_Promise_std__vector_ElectrocardiogramSample___(__promise)
|
|
@@ -112,14 +112,7 @@ open class HybridHeartbeatSeriesModuleSpec_cxx {
|
|
|
112
112
|
@inline(__always)
|
|
113
113
|
public final func queryHeartbeatSeriesSamples(options: bridge.std__optional_QueryOptionsWithSortOrder_) -> bridge.Result_std__shared_ptr_Promise_std__vector_HeartbeatSeriesSample____ {
|
|
114
114
|
do {
|
|
115
|
-
let __result = try self.__implementation.queryHeartbeatSeriesSamples(options:
|
|
116
|
-
if bridge.has_value_std__optional_QueryOptionsWithSortOrder_(options) {
|
|
117
|
-
let __unwrapped = bridge.get_std__optional_QueryOptionsWithSortOrder_(options)
|
|
118
|
-
return __unwrapped
|
|
119
|
-
} else {
|
|
120
|
-
return nil
|
|
121
|
-
}
|
|
122
|
-
}())
|
|
115
|
+
let __result = try self.__implementation.queryHeartbeatSeriesSamples(options: options.value)
|
|
123
116
|
let __resultCpp = { () -> bridge.std__shared_ptr_Promise_std__vector_HeartbeatSeriesSample___ in
|
|
124
117
|
let __promise = bridge.create_std__shared_ptr_Promise_std__vector_HeartbeatSeriesSample___()
|
|
125
118
|
let __promiseHolder = bridge.wrap_std__shared_ptr_Promise_std__vector_HeartbeatSeriesSample___(__promise)
|
|
@@ -189,14 +189,7 @@ open class HybridQuantityTypeModuleSpec_cxx {
|
|
|
189
189
|
@inline(__always)
|
|
190
190
|
public final func queryQuantitySamples(identifier: Int32, options: bridge.std__optional_QueryOptionsWithSortOrderAndUnit_) -> bridge.Result_std__shared_ptr_Promise_std__vector_QuantitySample____ {
|
|
191
191
|
do {
|
|
192
|
-
let __result = try self.__implementation.queryQuantitySamples(identifier: margelo.nitro.healthkit.QuantityTypeIdentifier(rawValue: identifier)!, options:
|
|
193
|
-
if bridge.has_value_std__optional_QueryOptionsWithSortOrderAndUnit_(options) {
|
|
194
|
-
let __unwrapped = bridge.get_std__optional_QueryOptionsWithSortOrderAndUnit_(options)
|
|
195
|
-
return __unwrapped
|
|
196
|
-
} else {
|
|
197
|
-
return nil
|
|
198
|
-
}
|
|
199
|
-
}())
|
|
192
|
+
let __result = try self.__implementation.queryQuantitySamples(identifier: margelo.nitro.healthkit.QuantityTypeIdentifier(rawValue: identifier)!, options: options.value)
|
|
200
193
|
let __resultCpp = { () -> bridge.std__shared_ptr_Promise_std__vector_QuantitySample___ in
|
|
201
194
|
let __promise = bridge.create_std__shared_ptr_Promise_std__vector_QuantitySample___()
|
|
202
195
|
let __promiseHolder = bridge.wrap_std__shared_ptr_Promise_std__vector_QuantitySample___(__promise)
|
|
@@ -221,14 +214,11 @@ open class HybridQuantityTypeModuleSpec_cxx {
|
|
|
221
214
|
@inline(__always)
|
|
222
215
|
public final func queryStatisticsForQuantity(identifier: Int32, statistics: bridge.std__vector_StatisticsOptions_, options: bridge.std__optional_StatisticsQueryOptions_) -> bridge.Result_std__shared_ptr_Promise_QueryStatisticsResponse___ {
|
|
223
216
|
do {
|
|
224
|
-
let __result = try self.__implementation.queryStatisticsForQuantity(identifier: margelo.nitro.healthkit.QuantityTypeIdentifier(rawValue: identifier)!, statistics:
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
return nil
|
|
230
|
-
}
|
|
231
|
-
}())
|
|
217
|
+
let __result = try self.__implementation.queryStatisticsForQuantity(identifier: margelo.nitro.healthkit.QuantityTypeIdentifier(rawValue: identifier)!, statistics: { () -> [StatisticsOptions] in
|
|
218
|
+
let __data = bridge.get_data_std__vector_StatisticsOptions_(statistics)
|
|
219
|
+
let __size = statistics.size()
|
|
220
|
+
return Array(UnsafeBufferPointer(start: __data, count: __size))
|
|
221
|
+
}(), options: options.value)
|
|
232
222
|
let __resultCpp = { () -> bridge.std__shared_ptr_Promise_QueryStatisticsResponse__ in
|
|
233
223
|
let __promise = bridge.create_std__shared_ptr_Promise_QueryStatisticsResponse__()
|
|
234
224
|
let __promiseHolder = bridge.wrap_std__shared_ptr_Promise_QueryStatisticsResponse__(__promise)
|
|
@@ -247,14 +237,11 @@ open class HybridQuantityTypeModuleSpec_cxx {
|
|
|
247
237
|
@inline(__always)
|
|
248
238
|
public final func queryStatisticsCollectionForQuantity(identifier: Int32, statistics: bridge.std__vector_StatisticsOptions_, anchorDate: std.string, intervalComponents: IntervalComponents, options: bridge.std__optional_StatisticsQueryOptions_) -> bridge.Result_std__shared_ptr_Promise_std__vector_QueryStatisticsResponse____ {
|
|
249
239
|
do {
|
|
250
|
-
let __result = try self.__implementation.queryStatisticsCollectionForQuantity(identifier: margelo.nitro.healthkit.QuantityTypeIdentifier(rawValue: identifier)!, statistics:
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
return nil
|
|
256
|
-
}
|
|
257
|
-
}())
|
|
240
|
+
let __result = try self.__implementation.queryStatisticsCollectionForQuantity(identifier: margelo.nitro.healthkit.QuantityTypeIdentifier(rawValue: identifier)!, statistics: { () -> [StatisticsOptions] in
|
|
241
|
+
let __data = bridge.get_data_std__vector_StatisticsOptions_(statistics)
|
|
242
|
+
let __size = statistics.size()
|
|
243
|
+
return Array(UnsafeBufferPointer(start: __data, count: __size))
|
|
244
|
+
}(), anchorDate: String(anchorDate), intervalComponents: intervalComponents, options: options.value)
|
|
258
245
|
let __resultCpp = { () -> bridge.std__shared_ptr_Promise_std__vector_QueryStatisticsResponse___ in
|
|
259
246
|
let __promise = bridge.create_std__shared_ptr_Promise_std__vector_QueryStatisticsResponse___()
|
|
260
247
|
let __promiseHolder = bridge.wrap_std__shared_ptr_Promise_std__vector_QueryStatisticsResponse___(__promise)
|
|
@@ -112,14 +112,7 @@ open class HybridStateOfMindModuleSpec_cxx {
|
|
|
112
112
|
@inline(__always)
|
|
113
113
|
public final func queryStateOfMindSamples(options: bridge.std__optional_QueryOptionsWithSortOrder_) -> bridge.Result_std__shared_ptr_Promise_std__vector_StateOfMindSample____ {
|
|
114
114
|
do {
|
|
115
|
-
let __result = try self.__implementation.queryStateOfMindSamples(options:
|
|
116
|
-
if bridge.has_value_std__optional_QueryOptionsWithSortOrder_(options) {
|
|
117
|
-
let __unwrapped = bridge.get_std__optional_QueryOptionsWithSortOrder_(options)
|
|
118
|
-
return __unwrapped
|
|
119
|
-
} else {
|
|
120
|
-
return nil
|
|
121
|
-
}
|
|
122
|
-
}())
|
|
115
|
+
let __result = try self.__implementation.queryStateOfMindSamples(options: options.value)
|
|
123
116
|
let __resultCpp = { () -> bridge.std__shared_ptr_Promise_std__vector_StateOfMindSample___ in
|
|
124
117
|
let __promise = bridge.create_std__shared_ptr_Promise_std__vector_StateOfMindSample___()
|
|
125
118
|
let __promiseHolder = bridge.wrap_std__shared_ptr_Promise_std__vector_StateOfMindSample___(__promise)
|
|
@@ -144,7 +137,15 @@ open class HybridStateOfMindModuleSpec_cxx {
|
|
|
144
137
|
@inline(__always)
|
|
145
138
|
public final func saveStateOfMindSample(date: margelo.nitro.chrono_time, kind: Int32, valence: Double, labels: bridge.std__vector_StateOfMindLabel_, associations: bridge.std__vector_StateOfMindAssociation_, metadata: bridge.std__optional_std__shared_ptr_AnyMap__) -> bridge.Result_std__shared_ptr_Promise_bool___ {
|
|
146
139
|
do {
|
|
147
|
-
let __result = try self.__implementation.saveStateOfMindSample(date: Date(fromChrono: date), kind: margelo.nitro.healthkit.StateOfMindKind(rawValue: kind)!, valence: valence, labels:
|
|
140
|
+
let __result = try self.__implementation.saveStateOfMindSample(date: Date(fromChrono: date), kind: margelo.nitro.healthkit.StateOfMindKind(rawValue: kind)!, valence: valence, labels: { () -> [StateOfMindLabel] in
|
|
141
|
+
let __data = bridge.get_data_std__vector_StateOfMindLabel_(labels)
|
|
142
|
+
let __size = labels.size()
|
|
143
|
+
return Array(UnsafeBufferPointer(start: __data, count: __size))
|
|
144
|
+
}(), associations: { () -> [StateOfMindAssociation] in
|
|
145
|
+
let __data = bridge.get_data_std__vector_StateOfMindAssociation_(associations)
|
|
146
|
+
let __size = associations.size()
|
|
147
|
+
return Array(UnsafeBufferPointer(start: __data, count: __size))
|
|
148
|
+
}(), metadata: { () -> AnyMap? in
|
|
148
149
|
if bridge.has_value_std__optional_std__shared_ptr_AnyMap__(metadata) {
|
|
149
150
|
let __unwrapped = bridge.get_std__optional_std__shared_ptr_AnyMap__(metadata)
|
|
150
151
|
return AnyMap(withCppPart: __unwrapped)
|
|
@@ -48,14 +48,7 @@ public extension QuantitySample {
|
|
|
48
48
|
var device: Device? {
|
|
49
49
|
@inline(__always)
|
|
50
50
|
get {
|
|
51
|
-
return
|
|
52
|
-
if bridge.has_value_std__optional_Device_(self.__device) {
|
|
53
|
-
let __unwrapped = bridge.get_std__optional_Device_(self.__device)
|
|
54
|
-
return __unwrapped
|
|
55
|
-
} else {
|
|
56
|
-
return nil
|
|
57
|
-
}
|
|
58
|
-
}()
|
|
51
|
+
return self.__device.value
|
|
59
52
|
}
|
|
60
53
|
@inline(__always)
|
|
61
54
|
set {
|
|
@@ -138,14 +131,7 @@ public extension QuantitySample {
|
|
|
138
131
|
var sourceRevision: SourceRevision? {
|
|
139
132
|
@inline(__always)
|
|
140
133
|
get {
|
|
141
|
-
return
|
|
142
|
-
if bridge.has_value_std__optional_SourceRevision_(self.__sourceRevision) {
|
|
143
|
-
let __unwrapped = bridge.get_std__optional_SourceRevision_(self.__sourceRevision)
|
|
144
|
-
return __unwrapped
|
|
145
|
-
} else {
|
|
146
|
-
return nil
|
|
147
|
-
}
|
|
148
|
-
}()
|
|
134
|
+
return self.__sourceRevision.value
|
|
149
135
|
}
|
|
150
136
|
@inline(__always)
|
|
151
137
|
set {
|
|
@@ -97,14 +97,7 @@ public extension QuantitySampleForSaving {
|
|
|
97
97
|
var sourceRevision: SourceRevision? {
|
|
98
98
|
@inline(__always)
|
|
99
99
|
get {
|
|
100
|
-
return
|
|
101
|
-
if bridge.has_value_std__optional_SourceRevision_(self.__sourceRevision) {
|
|
102
|
-
let __unwrapped = bridge.get_std__optional_SourceRevision_(self.__sourceRevision)
|
|
103
|
-
return __unwrapped
|
|
104
|
-
} else {
|
|
105
|
-
return nil
|
|
106
|
-
}
|
|
107
|
-
}()
|
|
100
|
+
return self.__sourceRevision.value
|
|
108
101
|
}
|
|
109
102
|
@inline(__always)
|
|
110
103
|
set {
|
|
@@ -79,14 +79,7 @@ public extension QueryStatisticsResponse {
|
|
|
79
79
|
var averageQuantity: Quantity? {
|
|
80
80
|
@inline(__always)
|
|
81
81
|
get {
|
|
82
|
-
return
|
|
83
|
-
if bridge.has_value_std__optional_Quantity_(self.__averageQuantity) {
|
|
84
|
-
let __unwrapped = bridge.get_std__optional_Quantity_(self.__averageQuantity)
|
|
85
|
-
return __unwrapped
|
|
86
|
-
} else {
|
|
87
|
-
return nil
|
|
88
|
-
}
|
|
89
|
-
}()
|
|
82
|
+
return self.__averageQuantity.value
|
|
90
83
|
}
|
|
91
84
|
@inline(__always)
|
|
92
85
|
set {
|
|
@@ -103,14 +96,7 @@ public extension QueryStatisticsResponse {
|
|
|
103
96
|
var maximumQuantity: Quantity? {
|
|
104
97
|
@inline(__always)
|
|
105
98
|
get {
|
|
106
|
-
return
|
|
107
|
-
if bridge.has_value_std__optional_Quantity_(self.__maximumQuantity) {
|
|
108
|
-
let __unwrapped = bridge.get_std__optional_Quantity_(self.__maximumQuantity)
|
|
109
|
-
return __unwrapped
|
|
110
|
-
} else {
|
|
111
|
-
return nil
|
|
112
|
-
}
|
|
113
|
-
}()
|
|
99
|
+
return self.__maximumQuantity.value
|
|
114
100
|
}
|
|
115
101
|
@inline(__always)
|
|
116
102
|
set {
|
|
@@ -127,14 +113,7 @@ public extension QueryStatisticsResponse {
|
|
|
127
113
|
var minimumQuantity: Quantity? {
|
|
128
114
|
@inline(__always)
|
|
129
115
|
get {
|
|
130
|
-
return
|
|
131
|
-
if bridge.has_value_std__optional_Quantity_(self.__minimumQuantity) {
|
|
132
|
-
let __unwrapped = bridge.get_std__optional_Quantity_(self.__minimumQuantity)
|
|
133
|
-
return __unwrapped
|
|
134
|
-
} else {
|
|
135
|
-
return nil
|
|
136
|
-
}
|
|
137
|
-
}()
|
|
116
|
+
return self.__minimumQuantity.value
|
|
138
117
|
}
|
|
139
118
|
@inline(__always)
|
|
140
119
|
set {
|
|
@@ -151,14 +130,7 @@ public extension QueryStatisticsResponse {
|
|
|
151
130
|
var sumQuantity: Quantity? {
|
|
152
131
|
@inline(__always)
|
|
153
132
|
get {
|
|
154
|
-
return
|
|
155
|
-
if bridge.has_value_std__optional_Quantity_(self.__sumQuantity) {
|
|
156
|
-
let __unwrapped = bridge.get_std__optional_Quantity_(self.__sumQuantity)
|
|
157
|
-
return __unwrapped
|
|
158
|
-
} else {
|
|
159
|
-
return nil
|
|
160
|
-
}
|
|
161
|
-
}()
|
|
133
|
+
return self.__sumQuantity.value
|
|
162
134
|
}
|
|
163
135
|
@inline(__always)
|
|
164
136
|
set {
|
|
@@ -175,14 +147,7 @@ public extension QueryStatisticsResponse {
|
|
|
175
147
|
var mostRecentQuantity: Quantity? {
|
|
176
148
|
@inline(__always)
|
|
177
149
|
get {
|
|
178
|
-
return
|
|
179
|
-
if bridge.has_value_std__optional_Quantity_(self.__mostRecentQuantity) {
|
|
180
|
-
let __unwrapped = bridge.get_std__optional_Quantity_(self.__mostRecentQuantity)
|
|
181
|
-
return __unwrapped
|
|
182
|
-
} else {
|
|
183
|
-
return nil
|
|
184
|
-
}
|
|
185
|
-
}()
|
|
150
|
+
return self.__mostRecentQuantity.value
|
|
186
151
|
}
|
|
187
152
|
@inline(__always)
|
|
188
153
|
set {
|
|
@@ -199,14 +164,7 @@ public extension QueryStatisticsResponse {
|
|
|
199
164
|
var mostRecentQuantityDateInterval: QuantityDateInterval? {
|
|
200
165
|
@inline(__always)
|
|
201
166
|
get {
|
|
202
|
-
return
|
|
203
|
-
if bridge.has_value_std__optional_QuantityDateInterval_(self.__mostRecentQuantityDateInterval) {
|
|
204
|
-
let __unwrapped = bridge.get_std__optional_QuantityDateInterval_(self.__mostRecentQuantityDateInterval)
|
|
205
|
-
return __unwrapped
|
|
206
|
-
} else {
|
|
207
|
-
return nil
|
|
208
|
-
}
|
|
209
|
-
}()
|
|
167
|
+
return self.__mostRecentQuantityDateInterval.value
|
|
210
168
|
}
|
|
211
169
|
@inline(__always)
|
|
212
170
|
set {
|
|
@@ -223,14 +181,7 @@ public extension QueryStatisticsResponse {
|
|
|
223
181
|
var duration: Quantity? {
|
|
224
182
|
@inline(__always)
|
|
225
183
|
get {
|
|
226
|
-
return
|
|
227
|
-
if bridge.has_value_std__optional_Quantity_(self.__duration) {
|
|
228
|
-
let __unwrapped = bridge.get_std__optional_Quantity_(self.__duration)
|
|
229
|
-
return __unwrapped
|
|
230
|
-
} else {
|
|
231
|
-
return nil
|
|
232
|
-
}
|
|
233
|
-
}()
|
|
184
|
+
return self.__duration.value
|
|
234
185
|
}
|
|
235
186
|
@inline(__always)
|
|
236
187
|
set {
|
|
@@ -37,19 +37,11 @@ public extension StateOfMindSample {
|
|
|
37
37
|
} else {
|
|
38
38
|
return .init()
|
|
39
39
|
}
|
|
40
|
-
}(), valence, kind, valenceClassification, {
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
return __vector
|
|
46
|
-
}(), { () -> bridge.std__vector_StateOfMindLabel_ in
|
|
47
|
-
var __vector = bridge.create_std__vector_StateOfMindLabel_(labels.count)
|
|
48
|
-
for __item in labels {
|
|
49
|
-
__vector.push_back(__item)
|
|
50
|
-
}
|
|
51
|
-
return __vector
|
|
52
|
-
}())
|
|
40
|
+
}(), valence, kind, valenceClassification, associations.withUnsafeBufferPointer { __pointer -> bridge.std__vector_StateOfMindAssociation_ in
|
|
41
|
+
return bridge.copy_std__vector_StateOfMindAssociation_(__pointer.baseAddress!, associations.count)
|
|
42
|
+
}, labels.withUnsafeBufferPointer { __pointer -> bridge.std__vector_StateOfMindLabel_ in
|
|
43
|
+
return bridge.copy_std__vector_StateOfMindLabel_(__pointer.baseAddress!, labels.count)
|
|
44
|
+
})
|
|
53
45
|
}
|
|
54
46
|
|
|
55
47
|
var uuid: String {
|
|
@@ -66,14 +58,7 @@ public extension StateOfMindSample {
|
|
|
66
58
|
var device: Device? {
|
|
67
59
|
@inline(__always)
|
|
68
60
|
get {
|
|
69
|
-
return
|
|
70
|
-
if bridge.has_value_std__optional_Device_(self.__device) {
|
|
71
|
-
let __unwrapped = bridge.get_std__optional_Device_(self.__device)
|
|
72
|
-
return __unwrapped
|
|
73
|
-
} else {
|
|
74
|
-
return nil
|
|
75
|
-
}
|
|
76
|
-
}()
|
|
61
|
+
return self.__device.value
|
|
77
62
|
}
|
|
78
63
|
@inline(__always)
|
|
79
64
|
set {
|
|
@@ -136,14 +121,7 @@ public extension StateOfMindSample {
|
|
|
136
121
|
var sourceRevision: SourceRevision? {
|
|
137
122
|
@inline(__always)
|
|
138
123
|
get {
|
|
139
|
-
return
|
|
140
|
-
if bridge.has_value_std__optional_SourceRevision_(self.__sourceRevision) {
|
|
141
|
-
let __unwrapped = bridge.get_std__optional_SourceRevision_(self.__sourceRevision)
|
|
142
|
-
return __unwrapped
|
|
143
|
-
} else {
|
|
144
|
-
return nil
|
|
145
|
-
}
|
|
146
|
-
}()
|
|
124
|
+
return self.__sourceRevision.value
|
|
147
125
|
}
|
|
148
126
|
@inline(__always)
|
|
149
127
|
set {
|
|
@@ -193,34 +171,34 @@ public extension StateOfMindSample {
|
|
|
193
171
|
var associations: [StateOfMindAssociation] {
|
|
194
172
|
@inline(__always)
|
|
195
173
|
get {
|
|
196
|
-
return
|
|
174
|
+
return { () -> [StateOfMindAssociation] in
|
|
175
|
+
let __data = bridge.get_data_std__vector_StateOfMindAssociation_(self.__associations)
|
|
176
|
+
let __size = self.__associations.size()
|
|
177
|
+
return Array(UnsafeBufferPointer(start: __data, count: __size))
|
|
178
|
+
}()
|
|
197
179
|
}
|
|
198
180
|
@inline(__always)
|
|
199
181
|
set {
|
|
200
|
-
self.__associations = {
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
__vector.push_back(__item)
|
|
204
|
-
}
|
|
205
|
-
return __vector
|
|
206
|
-
}()
|
|
182
|
+
self.__associations = newValue.withUnsafeBufferPointer { __pointer -> bridge.std__vector_StateOfMindAssociation_ in
|
|
183
|
+
return bridge.copy_std__vector_StateOfMindAssociation_(__pointer.baseAddress!, newValue.count)
|
|
184
|
+
}
|
|
207
185
|
}
|
|
208
186
|
}
|
|
209
187
|
|
|
210
188
|
var labels: [StateOfMindLabel] {
|
|
211
189
|
@inline(__always)
|
|
212
190
|
get {
|
|
213
|
-
return
|
|
191
|
+
return { () -> [StateOfMindLabel] in
|
|
192
|
+
let __data = bridge.get_data_std__vector_StateOfMindLabel_(self.__labels)
|
|
193
|
+
let __size = self.__labels.size()
|
|
194
|
+
return Array(UnsafeBufferPointer(start: __data, count: __size))
|
|
195
|
+
}()
|
|
214
196
|
}
|
|
215
197
|
@inline(__always)
|
|
216
198
|
set {
|
|
217
|
-
self.__labels = {
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
__vector.push_back(__item)
|
|
221
|
-
}
|
|
222
|
-
return __vector
|
|
223
|
-
}()
|
|
199
|
+
self.__labels = newValue.withUnsafeBufferPointer { __pointer -> bridge.std__vector_StateOfMindLabel_ in
|
|
200
|
+
return bridge.copy_std__vector_StateOfMindLabel_(__pointer.baseAddress!, newValue.count)
|
|
201
|
+
}
|
|
224
202
|
}
|
|
225
203
|
}
|
|
226
204
|
}
|