@kingstinct/react-native-healthkit 11.0.0 → 11.1.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.
Files changed (53) hide show
  1. package/README.md +2 -2
  2. package/ios/ElectrocardiogramModule.swift +210 -0
  3. package/ios/QuantityTypeModule.swift +52 -15
  4. package/lib/commonjs/healthkit.ios.js +6 -2
  5. package/lib/commonjs/healthkit.js +10 -2
  6. package/lib/commonjs/modules.js +2 -1
  7. package/lib/commonjs/specs/ElectrocardiogramModule.nitro.js +2 -0
  8. package/lib/commonjs/types/ElectrocardiogramSample.js +2 -0
  9. package/lib/module/healthkit.ios.js +5 -1
  10. package/lib/module/healthkit.js +8 -0
  11. package/lib/module/modules.js +1 -0
  12. package/lib/module/specs/ElectrocardiogramModule.nitro.js +1 -0
  13. package/lib/module/types/ElectrocardiogramSample.js +1 -0
  14. package/lib/typescript/healthkit.d.ts +2 -0
  15. package/lib/typescript/healthkit.ios.d.ts +4 -0
  16. package/lib/typescript/modules.d.ts +2 -0
  17. package/lib/typescript/specs/ElectrocardiogramModule.nitro.d.ts +8 -0
  18. package/lib/typescript/types/ElectrocardiogramSample.d.ts +39 -0
  19. package/nitrogen/generated/ios/ReactNativeHealthkit-Swift-Cxx-Bridge.cpp +33 -0
  20. package/nitrogen/generated/ios/ReactNativeHealthkit-Swift-Cxx-Bridge.hpp +176 -0
  21. package/nitrogen/generated/ios/ReactNativeHealthkit-Swift-Cxx-Umbrella.hpp +29 -0
  22. package/nitrogen/generated/ios/ReactNativeHealthkitAutolinking.mm +8 -0
  23. package/nitrogen/generated/ios/ReactNativeHealthkitAutolinking.swift +15 -0
  24. package/nitrogen/generated/ios/c++/HybridElectrocardiogramModuleSpecSwift.cpp +11 -0
  25. package/nitrogen/generated/ios/c++/HybridElectrocardiogramModuleSpecSwift.hpp +152 -0
  26. package/nitrogen/generated/ios/swift/ECGQueryOptionsWithAnchor.swift +179 -0
  27. package/nitrogen/generated/ios/swift/ECGQueryOptionsWithSortOrder.swift +184 -0
  28. package/nitrogen/generated/ios/swift/ElectrocardiogramClassification.swift +60 -0
  29. package/nitrogen/generated/ios/swift/ElectrocardiogramLead.swift +40 -0
  30. package/nitrogen/generated/ios/swift/ElectrocardiogramSample.swift +298 -0
  31. package/nitrogen/generated/ios/swift/ElectrocardiogramSamplesWithAnchorResponse.swift +81 -0
  32. package/nitrogen/generated/ios/swift/ElectrocardiogramSymptomsStatus.swift +44 -0
  33. package/nitrogen/generated/ios/swift/ElectrocardiogramVoltage.swift +57 -0
  34. package/nitrogen/generated/ios/swift/Func_void_ElectrocardiogramSamplesWithAnchorResponse.swift +47 -0
  35. package/nitrogen/generated/ios/swift/Func_void_std__vector_ElectrocardiogramSample_.swift +47 -0
  36. package/nitrogen/generated/ios/swift/HybridElectrocardiogramModuleSpec.swift +50 -0
  37. package/nitrogen/generated/ios/swift/HybridElectrocardiogramModuleSpec_cxx.swift +162 -0
  38. package/nitrogen/generated/shared/c++/ECGQueryOptionsWithAnchor.hpp +101 -0
  39. package/nitrogen/generated/shared/c++/ECGQueryOptionsWithSortOrder.hpp +100 -0
  40. package/nitrogen/generated/shared/c++/ElectrocardiogramClassification.hpp +96 -0
  41. package/nitrogen/generated/shared/c++/ElectrocardiogramLead.hpp +76 -0
  42. package/nitrogen/generated/shared/c++/ElectrocardiogramSample.hpp +135 -0
  43. package/nitrogen/generated/shared/c++/ElectrocardiogramSamplesWithAnchorResponse.hpp +81 -0
  44. package/nitrogen/generated/shared/c++/ElectrocardiogramSymptomsStatus.hpp +80 -0
  45. package/nitrogen/generated/shared/c++/ElectrocardiogramVoltage.hpp +76 -0
  46. package/nitrogen/generated/shared/c++/HybridElectrocardiogramModuleSpec.cpp +22 -0
  47. package/nitrogen/generated/shared/c++/HybridElectrocardiogramModuleSpec.hpp +76 -0
  48. package/package.json +1 -1
  49. package/src/healthkit.ios.ts +9 -0
  50. package/src/healthkit.ts +16 -0
  51. package/src/modules.ts +6 -0
  52. package/src/specs/ElectrocardiogramModule.nitro.ts +18 -0
  53. package/src/types/ElectrocardiogramSample.ts +60 -0
@@ -0,0 +1,179 @@
1
+ ///
2
+ /// ECGQueryOptionsWithAnchor.swift
3
+ /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
+ /// https://github.com/mrousavy/nitro
5
+ /// Copyright © 2025 Marc Rousavy @ Margelo
6
+ ///
7
+
8
+ import NitroModules
9
+
10
+ /**
11
+ * Represents an instance of `ECGQueryOptionsWithAnchor`, backed by a C++ struct.
12
+ */
13
+ public typealias ECGQueryOptionsWithAnchor = margelo.nitro.healthkit.ECGQueryOptionsWithAnchor
14
+
15
+ public extension ECGQueryOptionsWithAnchor {
16
+ private typealias bridge = margelo.nitro.healthkit.bridge.swift
17
+
18
+ /**
19
+ * Create a new instance of `ECGQueryOptionsWithAnchor`.
20
+ */
21
+ init(includeVoltages: Bool, anchor: String?, filter: Variant_PredicateWithUUID_PredicateWithUUIDs_PredicateWithMetadataKey_PredicateWithStartAndEnd_PredicateFromWorkout_FilterForSamplesAnd_FilterForSamplesOr?, limit: Double?) {
22
+ self.init(includeVoltages, { () -> bridge.std__optional_std__string_ in
23
+ if let __unwrappedValue = anchor {
24
+ return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
25
+ } else {
26
+ return .init()
27
+ }
28
+ }(), { () -> bridge.std__optional_std__variant_PredicateWithUUID__PredicateWithUUIDs__PredicateWithMetadataKey__PredicateWithStartAndEnd__PredicateFromWorkout__FilterForSamplesAnd__FilterForSamplesOr__ in
29
+ if let __unwrappedValue = filter {
30
+ return bridge.create_std__optional_std__variant_PredicateWithUUID__PredicateWithUUIDs__PredicateWithMetadataKey__PredicateWithStartAndEnd__PredicateFromWorkout__FilterForSamplesAnd__FilterForSamplesOr__({ () -> bridge.std__variant_PredicateWithUUID__PredicateWithUUIDs__PredicateWithMetadataKey__PredicateWithStartAndEnd__PredicateFromWorkout__FilterForSamplesAnd__FilterForSamplesOr_ in
31
+ switch __unwrappedValue {
32
+ case .first(let __value):
33
+ return bridge.create_std__variant_PredicateWithUUID__PredicateWithUUIDs__PredicateWithMetadataKey__PredicateWithStartAndEnd__PredicateFromWorkout__FilterForSamplesAnd__FilterForSamplesOr_(__value)
34
+ case .second(let __value):
35
+ return bridge.create_std__variant_PredicateWithUUID__PredicateWithUUIDs__PredicateWithMetadataKey__PredicateWithStartAndEnd__PredicateFromWorkout__FilterForSamplesAnd__FilterForSamplesOr_(__value)
36
+ case .third(let __value):
37
+ return bridge.create_std__variant_PredicateWithUUID__PredicateWithUUIDs__PredicateWithMetadataKey__PredicateWithStartAndEnd__PredicateFromWorkout__FilterForSamplesAnd__FilterForSamplesOr_(__value)
38
+ case .fourth(let __value):
39
+ return bridge.create_std__variant_PredicateWithUUID__PredicateWithUUIDs__PredicateWithMetadataKey__PredicateWithStartAndEnd__PredicateFromWorkout__FilterForSamplesAnd__FilterForSamplesOr_(__value)
40
+ case .fifth(let __value):
41
+ return bridge.create_std__variant_PredicateWithUUID__PredicateWithUUIDs__PredicateWithMetadataKey__PredicateWithStartAndEnd__PredicateFromWorkout__FilterForSamplesAnd__FilterForSamplesOr_(__value)
42
+ case .sixth(let __value):
43
+ return bridge.create_std__variant_PredicateWithUUID__PredicateWithUUIDs__PredicateWithMetadataKey__PredicateWithStartAndEnd__PredicateFromWorkout__FilterForSamplesAnd__FilterForSamplesOr_(__value)
44
+ case .seventh(let __value):
45
+ return bridge.create_std__variant_PredicateWithUUID__PredicateWithUUIDs__PredicateWithMetadataKey__PredicateWithStartAndEnd__PredicateFromWorkout__FilterForSamplesAnd__FilterForSamplesOr_(__value)
46
+ }
47
+ }().variant)
48
+ } else {
49
+ return .init()
50
+ }
51
+ }(), { () -> bridge.std__optional_double_ in
52
+ if let __unwrappedValue = limit {
53
+ return bridge.create_std__optional_double_(__unwrappedValue)
54
+ } else {
55
+ return .init()
56
+ }
57
+ }())
58
+ }
59
+
60
+ var includeVoltages: Bool {
61
+ @inline(__always)
62
+ get {
63
+ return self.__includeVoltages
64
+ }
65
+ @inline(__always)
66
+ set {
67
+ self.__includeVoltages = newValue
68
+ }
69
+ }
70
+
71
+ var anchor: String? {
72
+ @inline(__always)
73
+ get {
74
+ return { () -> String? in
75
+ if bridge.has_value_std__optional_std__string_(self.__anchor) {
76
+ let __unwrapped = bridge.get_std__optional_std__string_(self.__anchor)
77
+ return String(__unwrapped)
78
+ } else {
79
+ return nil
80
+ }
81
+ }()
82
+ }
83
+ @inline(__always)
84
+ set {
85
+ self.__anchor = { () -> bridge.std__optional_std__string_ in
86
+ if let __unwrappedValue = newValue {
87
+ return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
88
+ } else {
89
+ return .init()
90
+ }
91
+ }()
92
+ }
93
+ }
94
+
95
+ var filter: Variant_PredicateWithUUID_PredicateWithUUIDs_PredicateWithMetadataKey_PredicateWithStartAndEnd_PredicateFromWorkout_FilterForSamplesAnd_FilterForSamplesOr? {
96
+ @inline(__always)
97
+ get {
98
+ return { () -> Variant_PredicateWithUUID_PredicateWithUUIDs_PredicateWithMetadataKey_PredicateWithStartAndEnd_PredicateFromWorkout_FilterForSamplesAnd_FilterForSamplesOr? in
99
+ if bridge.has_value_std__optional_std__variant_PredicateWithUUID__PredicateWithUUIDs__PredicateWithMetadataKey__PredicateWithStartAndEnd__PredicateFromWorkout__FilterForSamplesAnd__FilterForSamplesOr__(self.__filter) {
100
+ let __unwrapped = bridge.get_std__optional_std__variant_PredicateWithUUID__PredicateWithUUIDs__PredicateWithMetadataKey__PredicateWithStartAndEnd__PredicateFromWorkout__FilterForSamplesAnd__FilterForSamplesOr__(self.__filter)
101
+ return { () -> Variant_PredicateWithUUID_PredicateWithUUIDs_PredicateWithMetadataKey_PredicateWithStartAndEnd_PredicateFromWorkout_FilterForSamplesAnd_FilterForSamplesOr in
102
+ let __variant = bridge.std__variant_PredicateWithUUID__PredicateWithUUIDs__PredicateWithMetadataKey__PredicateWithStartAndEnd__PredicateFromWorkout__FilterForSamplesAnd__FilterForSamplesOr_(__unwrapped)
103
+ switch __variant.index() {
104
+ case 0:
105
+ let __actual = __variant.get_0()
106
+ return .first(__actual)
107
+ case 1:
108
+ let __actual = __variant.get_1()
109
+ return .second(__actual)
110
+ case 2:
111
+ let __actual = __variant.get_2()
112
+ return .third(__actual)
113
+ case 3:
114
+ let __actual = __variant.get_3()
115
+ return .fourth(__actual)
116
+ case 4:
117
+ let __actual = __variant.get_4()
118
+ return .fifth(__actual)
119
+ case 5:
120
+ let __actual = __variant.get_5()
121
+ return .sixth(__actual)
122
+ case 6:
123
+ let __actual = __variant.get_6()
124
+ return .seventh(__actual)
125
+ default:
126
+ fatalError("Variant can never have index \(__variant.index())!")
127
+ }
128
+ }()
129
+ } else {
130
+ return nil
131
+ }
132
+ }()
133
+ }
134
+ @inline(__always)
135
+ set {
136
+ self.__filter = { () -> bridge.std__optional_std__variant_PredicateWithUUID__PredicateWithUUIDs__PredicateWithMetadataKey__PredicateWithStartAndEnd__PredicateFromWorkout__FilterForSamplesAnd__FilterForSamplesOr__ in
137
+ if let __unwrappedValue = newValue {
138
+ return bridge.create_std__optional_std__variant_PredicateWithUUID__PredicateWithUUIDs__PredicateWithMetadataKey__PredicateWithStartAndEnd__PredicateFromWorkout__FilterForSamplesAnd__FilterForSamplesOr__({ () -> bridge.std__variant_PredicateWithUUID__PredicateWithUUIDs__PredicateWithMetadataKey__PredicateWithStartAndEnd__PredicateFromWorkout__FilterForSamplesAnd__FilterForSamplesOr_ in
139
+ switch __unwrappedValue {
140
+ case .first(let __value):
141
+ return bridge.create_std__variant_PredicateWithUUID__PredicateWithUUIDs__PredicateWithMetadataKey__PredicateWithStartAndEnd__PredicateFromWorkout__FilterForSamplesAnd__FilterForSamplesOr_(__value)
142
+ case .second(let __value):
143
+ return bridge.create_std__variant_PredicateWithUUID__PredicateWithUUIDs__PredicateWithMetadataKey__PredicateWithStartAndEnd__PredicateFromWorkout__FilterForSamplesAnd__FilterForSamplesOr_(__value)
144
+ case .third(let __value):
145
+ return bridge.create_std__variant_PredicateWithUUID__PredicateWithUUIDs__PredicateWithMetadataKey__PredicateWithStartAndEnd__PredicateFromWorkout__FilterForSamplesAnd__FilterForSamplesOr_(__value)
146
+ case .fourth(let __value):
147
+ return bridge.create_std__variant_PredicateWithUUID__PredicateWithUUIDs__PredicateWithMetadataKey__PredicateWithStartAndEnd__PredicateFromWorkout__FilterForSamplesAnd__FilterForSamplesOr_(__value)
148
+ case .fifth(let __value):
149
+ return bridge.create_std__variant_PredicateWithUUID__PredicateWithUUIDs__PredicateWithMetadataKey__PredicateWithStartAndEnd__PredicateFromWorkout__FilterForSamplesAnd__FilterForSamplesOr_(__value)
150
+ case .sixth(let __value):
151
+ return bridge.create_std__variant_PredicateWithUUID__PredicateWithUUIDs__PredicateWithMetadataKey__PredicateWithStartAndEnd__PredicateFromWorkout__FilterForSamplesAnd__FilterForSamplesOr_(__value)
152
+ case .seventh(let __value):
153
+ return bridge.create_std__variant_PredicateWithUUID__PredicateWithUUIDs__PredicateWithMetadataKey__PredicateWithStartAndEnd__PredicateFromWorkout__FilterForSamplesAnd__FilterForSamplesOr_(__value)
154
+ }
155
+ }().variant)
156
+ } else {
157
+ return .init()
158
+ }
159
+ }()
160
+ }
161
+ }
162
+
163
+ var limit: Double? {
164
+ @inline(__always)
165
+ get {
166
+ return self.__limit.value
167
+ }
168
+ @inline(__always)
169
+ set {
170
+ self.__limit = { () -> bridge.std__optional_double_ in
171
+ if let __unwrappedValue = newValue {
172
+ return bridge.create_std__optional_double_(__unwrappedValue)
173
+ } else {
174
+ return .init()
175
+ }
176
+ }()
177
+ }
178
+ }
179
+ }
@@ -0,0 +1,184 @@
1
+ ///
2
+ /// ECGQueryOptionsWithSortOrder.swift
3
+ /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
+ /// https://github.com/mrousavy/nitro
5
+ /// Copyright © 2025 Marc Rousavy @ Margelo
6
+ ///
7
+
8
+ import NitroModules
9
+
10
+ /**
11
+ * Represents an instance of `ECGQueryOptionsWithSortOrder`, backed by a C++ struct.
12
+ */
13
+ public typealias ECGQueryOptionsWithSortOrder = margelo.nitro.healthkit.ECGQueryOptionsWithSortOrder
14
+
15
+ public extension ECGQueryOptionsWithSortOrder {
16
+ private typealias bridge = margelo.nitro.healthkit.bridge.swift
17
+
18
+ /**
19
+ * Create a new instance of `ECGQueryOptionsWithSortOrder`.
20
+ */
21
+ init(includeVoltages: Bool?, ascending: Bool?, filter: Variant_PredicateWithUUID_PredicateWithUUIDs_PredicateWithMetadataKey_PredicateWithStartAndEnd_PredicateFromWorkout_FilterForSamplesAnd_FilterForSamplesOr?, limit: Double?) {
22
+ self.init({ () -> bridge.std__optional_bool_ in
23
+ if let __unwrappedValue = includeVoltages {
24
+ return bridge.create_std__optional_bool_(__unwrappedValue)
25
+ } else {
26
+ return .init()
27
+ }
28
+ }(), { () -> bridge.std__optional_bool_ in
29
+ if let __unwrappedValue = ascending {
30
+ return bridge.create_std__optional_bool_(__unwrappedValue)
31
+ } else {
32
+ return .init()
33
+ }
34
+ }(), { () -> bridge.std__optional_std__variant_PredicateWithUUID__PredicateWithUUIDs__PredicateWithMetadataKey__PredicateWithStartAndEnd__PredicateFromWorkout__FilterForSamplesAnd__FilterForSamplesOr__ in
35
+ if let __unwrappedValue = filter {
36
+ return bridge.create_std__optional_std__variant_PredicateWithUUID__PredicateWithUUIDs__PredicateWithMetadataKey__PredicateWithStartAndEnd__PredicateFromWorkout__FilterForSamplesAnd__FilterForSamplesOr__({ () -> bridge.std__variant_PredicateWithUUID__PredicateWithUUIDs__PredicateWithMetadataKey__PredicateWithStartAndEnd__PredicateFromWorkout__FilterForSamplesAnd__FilterForSamplesOr_ in
37
+ switch __unwrappedValue {
38
+ case .first(let __value):
39
+ return bridge.create_std__variant_PredicateWithUUID__PredicateWithUUIDs__PredicateWithMetadataKey__PredicateWithStartAndEnd__PredicateFromWorkout__FilterForSamplesAnd__FilterForSamplesOr_(__value)
40
+ case .second(let __value):
41
+ return bridge.create_std__variant_PredicateWithUUID__PredicateWithUUIDs__PredicateWithMetadataKey__PredicateWithStartAndEnd__PredicateFromWorkout__FilterForSamplesAnd__FilterForSamplesOr_(__value)
42
+ case .third(let __value):
43
+ return bridge.create_std__variant_PredicateWithUUID__PredicateWithUUIDs__PredicateWithMetadataKey__PredicateWithStartAndEnd__PredicateFromWorkout__FilterForSamplesAnd__FilterForSamplesOr_(__value)
44
+ case .fourth(let __value):
45
+ return bridge.create_std__variant_PredicateWithUUID__PredicateWithUUIDs__PredicateWithMetadataKey__PredicateWithStartAndEnd__PredicateFromWorkout__FilterForSamplesAnd__FilterForSamplesOr_(__value)
46
+ case .fifth(let __value):
47
+ return bridge.create_std__variant_PredicateWithUUID__PredicateWithUUIDs__PredicateWithMetadataKey__PredicateWithStartAndEnd__PredicateFromWorkout__FilterForSamplesAnd__FilterForSamplesOr_(__value)
48
+ case .sixth(let __value):
49
+ return bridge.create_std__variant_PredicateWithUUID__PredicateWithUUIDs__PredicateWithMetadataKey__PredicateWithStartAndEnd__PredicateFromWorkout__FilterForSamplesAnd__FilterForSamplesOr_(__value)
50
+ case .seventh(let __value):
51
+ return bridge.create_std__variant_PredicateWithUUID__PredicateWithUUIDs__PredicateWithMetadataKey__PredicateWithStartAndEnd__PredicateFromWorkout__FilterForSamplesAnd__FilterForSamplesOr_(__value)
52
+ }
53
+ }().variant)
54
+ } else {
55
+ return .init()
56
+ }
57
+ }(), { () -> bridge.std__optional_double_ in
58
+ if let __unwrappedValue = limit {
59
+ return bridge.create_std__optional_double_(__unwrappedValue)
60
+ } else {
61
+ return .init()
62
+ }
63
+ }())
64
+ }
65
+
66
+ var includeVoltages: Bool? {
67
+ @inline(__always)
68
+ get {
69
+ return self.__includeVoltages.value
70
+ }
71
+ @inline(__always)
72
+ set {
73
+ self.__includeVoltages = { () -> bridge.std__optional_bool_ in
74
+ if let __unwrappedValue = newValue {
75
+ return bridge.create_std__optional_bool_(__unwrappedValue)
76
+ } else {
77
+ return .init()
78
+ }
79
+ }()
80
+ }
81
+ }
82
+
83
+ var ascending: Bool? {
84
+ @inline(__always)
85
+ get {
86
+ return self.__ascending.value
87
+ }
88
+ @inline(__always)
89
+ set {
90
+ self.__ascending = { () -> bridge.std__optional_bool_ in
91
+ if let __unwrappedValue = newValue {
92
+ return bridge.create_std__optional_bool_(__unwrappedValue)
93
+ } else {
94
+ return .init()
95
+ }
96
+ }()
97
+ }
98
+ }
99
+
100
+ var filter: Variant_PredicateWithUUID_PredicateWithUUIDs_PredicateWithMetadataKey_PredicateWithStartAndEnd_PredicateFromWorkout_FilterForSamplesAnd_FilterForSamplesOr? {
101
+ @inline(__always)
102
+ get {
103
+ return { () -> Variant_PredicateWithUUID_PredicateWithUUIDs_PredicateWithMetadataKey_PredicateWithStartAndEnd_PredicateFromWorkout_FilterForSamplesAnd_FilterForSamplesOr? in
104
+ if bridge.has_value_std__optional_std__variant_PredicateWithUUID__PredicateWithUUIDs__PredicateWithMetadataKey__PredicateWithStartAndEnd__PredicateFromWorkout__FilterForSamplesAnd__FilterForSamplesOr__(self.__filter) {
105
+ let __unwrapped = bridge.get_std__optional_std__variant_PredicateWithUUID__PredicateWithUUIDs__PredicateWithMetadataKey__PredicateWithStartAndEnd__PredicateFromWorkout__FilterForSamplesAnd__FilterForSamplesOr__(self.__filter)
106
+ return { () -> Variant_PredicateWithUUID_PredicateWithUUIDs_PredicateWithMetadataKey_PredicateWithStartAndEnd_PredicateFromWorkout_FilterForSamplesAnd_FilterForSamplesOr in
107
+ let __variant = bridge.std__variant_PredicateWithUUID__PredicateWithUUIDs__PredicateWithMetadataKey__PredicateWithStartAndEnd__PredicateFromWorkout__FilterForSamplesAnd__FilterForSamplesOr_(__unwrapped)
108
+ switch __variant.index() {
109
+ case 0:
110
+ let __actual = __variant.get_0()
111
+ return .first(__actual)
112
+ case 1:
113
+ let __actual = __variant.get_1()
114
+ return .second(__actual)
115
+ case 2:
116
+ let __actual = __variant.get_2()
117
+ return .third(__actual)
118
+ case 3:
119
+ let __actual = __variant.get_3()
120
+ return .fourth(__actual)
121
+ case 4:
122
+ let __actual = __variant.get_4()
123
+ return .fifth(__actual)
124
+ case 5:
125
+ let __actual = __variant.get_5()
126
+ return .sixth(__actual)
127
+ case 6:
128
+ let __actual = __variant.get_6()
129
+ return .seventh(__actual)
130
+ default:
131
+ fatalError("Variant can never have index \(__variant.index())!")
132
+ }
133
+ }()
134
+ } else {
135
+ return nil
136
+ }
137
+ }()
138
+ }
139
+ @inline(__always)
140
+ set {
141
+ self.__filter = { () -> bridge.std__optional_std__variant_PredicateWithUUID__PredicateWithUUIDs__PredicateWithMetadataKey__PredicateWithStartAndEnd__PredicateFromWorkout__FilterForSamplesAnd__FilterForSamplesOr__ in
142
+ if let __unwrappedValue = newValue {
143
+ return bridge.create_std__optional_std__variant_PredicateWithUUID__PredicateWithUUIDs__PredicateWithMetadataKey__PredicateWithStartAndEnd__PredicateFromWorkout__FilterForSamplesAnd__FilterForSamplesOr__({ () -> bridge.std__variant_PredicateWithUUID__PredicateWithUUIDs__PredicateWithMetadataKey__PredicateWithStartAndEnd__PredicateFromWorkout__FilterForSamplesAnd__FilterForSamplesOr_ in
144
+ switch __unwrappedValue {
145
+ case .first(let __value):
146
+ return bridge.create_std__variant_PredicateWithUUID__PredicateWithUUIDs__PredicateWithMetadataKey__PredicateWithStartAndEnd__PredicateFromWorkout__FilterForSamplesAnd__FilterForSamplesOr_(__value)
147
+ case .second(let __value):
148
+ return bridge.create_std__variant_PredicateWithUUID__PredicateWithUUIDs__PredicateWithMetadataKey__PredicateWithStartAndEnd__PredicateFromWorkout__FilterForSamplesAnd__FilterForSamplesOr_(__value)
149
+ case .third(let __value):
150
+ return bridge.create_std__variant_PredicateWithUUID__PredicateWithUUIDs__PredicateWithMetadataKey__PredicateWithStartAndEnd__PredicateFromWorkout__FilterForSamplesAnd__FilterForSamplesOr_(__value)
151
+ case .fourth(let __value):
152
+ return bridge.create_std__variant_PredicateWithUUID__PredicateWithUUIDs__PredicateWithMetadataKey__PredicateWithStartAndEnd__PredicateFromWorkout__FilterForSamplesAnd__FilterForSamplesOr_(__value)
153
+ case .fifth(let __value):
154
+ return bridge.create_std__variant_PredicateWithUUID__PredicateWithUUIDs__PredicateWithMetadataKey__PredicateWithStartAndEnd__PredicateFromWorkout__FilterForSamplesAnd__FilterForSamplesOr_(__value)
155
+ case .sixth(let __value):
156
+ return bridge.create_std__variant_PredicateWithUUID__PredicateWithUUIDs__PredicateWithMetadataKey__PredicateWithStartAndEnd__PredicateFromWorkout__FilterForSamplesAnd__FilterForSamplesOr_(__value)
157
+ case .seventh(let __value):
158
+ return bridge.create_std__variant_PredicateWithUUID__PredicateWithUUIDs__PredicateWithMetadataKey__PredicateWithStartAndEnd__PredicateFromWorkout__FilterForSamplesAnd__FilterForSamplesOr_(__value)
159
+ }
160
+ }().variant)
161
+ } else {
162
+ return .init()
163
+ }
164
+ }()
165
+ }
166
+ }
167
+
168
+ var limit: Double? {
169
+ @inline(__always)
170
+ get {
171
+ return self.__limit.value
172
+ }
173
+ @inline(__always)
174
+ set {
175
+ self.__limit = { () -> bridge.std__optional_double_ in
176
+ if let __unwrappedValue = newValue {
177
+ return bridge.create_std__optional_double_(__unwrappedValue)
178
+ } else {
179
+ return .init()
180
+ }
181
+ }()
182
+ }
183
+ }
184
+ }
@@ -0,0 +1,60 @@
1
+ ///
2
+ /// ElectrocardiogramClassification.swift
3
+ /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
+ /// https://github.com/mrousavy/nitro
5
+ /// Copyright © 2025 Marc Rousavy @ Margelo
6
+ ///
7
+
8
+ /**
9
+ * Represents the JS union `ElectrocardiogramClassification`, backed by a C++ enum.
10
+ */
11
+ public typealias ElectrocardiogramClassification = margelo.nitro.healthkit.ElectrocardiogramClassification
12
+
13
+ public extension ElectrocardiogramClassification {
14
+ /**
15
+ * Get a ElectrocardiogramClassification for the given String value, or
16
+ * return `nil` if the given value was invalid/unknown.
17
+ */
18
+ init?(fromString string: String) {
19
+ switch string {
20
+ case "notSet":
21
+ self = .notset
22
+ case "sinusRhythm":
23
+ self = .sinusrhythm
24
+ case "atrialFibrillation":
25
+ self = .atrialfibrillation
26
+ case "inconclusiveLowHeartRate":
27
+ self = .inconclusivelowheartrate
28
+ case "inconclusiveHighHeartRate":
29
+ self = .inconclusivehighheartrate
30
+ case "inconclusivePoorReading":
31
+ self = .inconclusivepoorreading
32
+ case "inconclusiveOther":
33
+ self = .inconclusiveother
34
+ default:
35
+ return nil
36
+ }
37
+ }
38
+
39
+ /**
40
+ * Get the String value this ElectrocardiogramClassification represents.
41
+ */
42
+ var stringValue: String {
43
+ switch self {
44
+ case .notset:
45
+ return "notSet"
46
+ case .sinusrhythm:
47
+ return "sinusRhythm"
48
+ case .atrialfibrillation:
49
+ return "atrialFibrillation"
50
+ case .inconclusivelowheartrate:
51
+ return "inconclusiveLowHeartRate"
52
+ case .inconclusivehighheartrate:
53
+ return "inconclusiveHighHeartRate"
54
+ case .inconclusivepoorreading:
55
+ return "inconclusivePoorReading"
56
+ case .inconclusiveother:
57
+ return "inconclusiveOther"
58
+ }
59
+ }
60
+ }
@@ -0,0 +1,40 @@
1
+ ///
2
+ /// ElectrocardiogramLead.swift
3
+ /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
+ /// https://github.com/mrousavy/nitro
5
+ /// Copyright © 2025 Marc Rousavy @ Margelo
6
+ ///
7
+
8
+ /**
9
+ * Represents the JS union `ElectrocardiogramLead`, backed by a C++ enum.
10
+ */
11
+ public typealias ElectrocardiogramLead = margelo.nitro.healthkit.ElectrocardiogramLead
12
+
13
+ public extension ElectrocardiogramLead {
14
+ /**
15
+ * Get a ElectrocardiogramLead for the given String value, or
16
+ * return `nil` if the given value was invalid/unknown.
17
+ */
18
+ init?(fromString string: String) {
19
+ switch string {
20
+ case "appleWatchSimilarToLeadI":
21
+ self = .applewatchsimilartoleadi
22
+ case "unknown":
23
+ self = .unknown
24
+ default:
25
+ return nil
26
+ }
27
+ }
28
+
29
+ /**
30
+ * Get the String value this ElectrocardiogramLead represents.
31
+ */
32
+ var stringValue: String {
33
+ switch self {
34
+ case .applewatchsimilartoleadi:
35
+ return "appleWatchSimilarToLeadI"
36
+ case .unknown:
37
+ return "unknown"
38
+ }
39
+ }
40
+ }