securiti-consent-sdk 1.132.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/NitroSecuritiConsentSdk.podspec +37 -0
- package/README.md +45 -0
- package/android/CMakeLists.txt +29 -0
- package/android/build.gradle +146 -0
- package/android/gradle.properties +5 -0
- package/android/src/main/AndroidManifest.xml +2 -0
- package/android/src/main/cpp/cpp-adapter.cpp +6 -0
- package/android/src/main/java/com/margelo/nitro/securiticonsentsdk/HybridConsentSDK.kt +669 -0
- package/android/src/main/java/com/margelo/nitro/securiticonsentsdk/NitroSecuritiConsentSdkPackage.java +33 -0
- package/ios/Bridge.h +10 -0
- package/ios/HybridConsentSDK.swift +640 -0
- package/nitrogen/generated/.gitattributes +1 -0
- package/nitrogen/generated/android/NitroSecuritiConsentSdk+autolinking.cmake +78 -0
- package/nitrogen/generated/android/NitroSecuritiConsentSdk+autolinking.gradle +27 -0
- package/nitrogen/generated/android/NitroSecuritiConsentSdkOnLoad.cpp +48 -0
- package/nitrogen/generated/android/NitroSecuritiConsentSdkOnLoad.hpp +25 -0
- package/nitrogen/generated/android/c++/JAppPermission.hpp +86 -0
- package/nitrogen/generated/android/c++/JBannerConfig.hpp +194 -0
- package/nitrogen/generated/android/c++/JCmpSDKOptions.hpp +94 -0
- package/nitrogen/generated/android/c++/JCustomColors.hpp +82 -0
- package/nitrogen/generated/android/c++/JFunc_void_bool.hpp +74 -0
- package/nitrogen/generated/android/c++/JHybridConsentSDKSpec.cpp +277 -0
- package/nitrogen/generated/android/c++/JHybridConsentSDKSpec.hpp +78 -0
- package/nitrogen/generated/android/c++/JPermissionConsent.hpp +61 -0
- package/nitrogen/generated/android/c++/JPostConsentsRequest.hpp +137 -0
- package/nitrogen/generated/android/c++/JPurpose.hpp +118 -0
- package/nitrogen/generated/android/c++/JPurposeConsent.hpp +65 -0
- package/nitrogen/generated/android/c++/JSDK.hpp +104 -0
- package/nitrogen/generated/android/c++/JSettingsPrompt.hpp +88 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/securiticonsentsdk/AppPermission.kt +34 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/securiticonsentsdk/BannerConfig.kt +57 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/securiticonsentsdk/CmpSDKOptions.kt +36 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/securiticonsentsdk/CustomColors.kt +33 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/securiticonsentsdk/Func_void_bool.kt +80 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/securiticonsentsdk/HybridConsentSDKSpec.kt +121 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/securiticonsentsdk/NitroSecuritiConsentSdkOnLoad.kt +35 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/securiticonsentsdk/PermissionConsent.kt +28 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/securiticonsentsdk/PostConsentsRequest.kt +37 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/securiticonsentsdk/Purpose.kt +37 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/securiticonsentsdk/PurposeConsent.kt +29 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/securiticonsentsdk/SDK.kt +34 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/securiticonsentsdk/SettingsPrompt.kt +30 -0
- package/nitrogen/generated/ios/NitroSecuritiConsentSdk+autolinking.rb +60 -0
- package/nitrogen/generated/ios/NitroSecuritiConsentSdk-Swift-Cxx-Bridge.cpp +96 -0
- package/nitrogen/generated/ios/NitroSecuritiConsentSdk-Swift-Cxx-Bridge.hpp +604 -0
- package/nitrogen/generated/ios/NitroSecuritiConsentSdk-Swift-Cxx-Umbrella.hpp +78 -0
- package/nitrogen/generated/ios/NitroSecuritiConsentSdkAutolinking.mm +33 -0
- package/nitrogen/generated/ios/NitroSecuritiConsentSdkAutolinking.swift +25 -0
- package/nitrogen/generated/ios/c++/HybridConsentSDKSpecSwift.cpp +11 -0
- package/nitrogen/generated/ios/c++/HybridConsentSDKSpecSwift.hpp +223 -0
- package/nitrogen/generated/ios/swift/AppPermission.swift +267 -0
- package/nitrogen/generated/ios/swift/BannerConfig.swift +918 -0
- package/nitrogen/generated/ios/swift/CmpSDKOptions.swift +217 -0
- package/nitrogen/generated/ios/swift/CustomColors.swift +256 -0
- package/nitrogen/generated/ios/swift/Func_void_bool.swift +46 -0
- package/nitrogen/generated/ios/swift/Func_void_std__exception_ptr.swift +46 -0
- package/nitrogen/generated/ios/swift/Func_void_std__optional_BannerConfig_.swift +52 -0
- package/nitrogen/generated/ios/swift/Func_void_std__optional_SettingsPrompt_.swift +52 -0
- package/nitrogen/generated/ios/swift/Func_void_std__string.swift +46 -0
- package/nitrogen/generated/ios/swift/Func_void_std__vector_AppPermission_.swift +46 -0
- package/nitrogen/generated/ios/swift/Func_void_std__vector_Purpose_.swift +46 -0
- package/nitrogen/generated/ios/swift/Func_void_std__vector_SDK_.swift +46 -0
- package/nitrogen/generated/ios/swift/HybridConsentSDKSpec.swift +64 -0
- package/nitrogen/generated/ios/swift/HybridConsentSDKSpec_cxx.swift +398 -0
- package/nitrogen/generated/ios/swift/PermissionConsent.swift +57 -0
- package/nitrogen/generated/ios/swift/PostConsentsRequest.swift +216 -0
- package/nitrogen/generated/ios/swift/Purpose.swift +354 -0
- package/nitrogen/generated/ios/swift/PurposeConsent.swift +68 -0
- package/nitrogen/generated/ios/swift/SDK.swift +285 -0
- package/nitrogen/generated/ios/swift/SettingsPrompt.swift +181 -0
- package/nitrogen/generated/shared/c++/AppPermission.hpp +102 -0
- package/nitrogen/generated/shared/c++/BannerConfig.hpp +197 -0
- package/nitrogen/generated/shared/c++/CmpSDKOptions.hpp +110 -0
- package/nitrogen/generated/shared/c++/CustomColors.hpp +98 -0
- package/nitrogen/generated/shared/c++/HybridConsentSDKSpec.cpp +37 -0
- package/nitrogen/generated/shared/c++/HybridConsentSDKSpec.hpp +102 -0
- package/nitrogen/generated/shared/c++/PermissionConsent.hpp +77 -0
- package/nitrogen/generated/shared/c++/PostConsentsRequest.hpp +120 -0
- package/nitrogen/generated/shared/c++/Purpose.hpp +117 -0
- package/nitrogen/generated/shared/c++/PurposeConsent.hpp +81 -0
- package/nitrogen/generated/shared/c++/SDK.hpp +103 -0
- package/nitrogen/generated/shared/c++/SettingsPrompt.hpp +87 -0
- package/package.json +107 -0
- package/react-native.config.js +16 -0
- package/src/ConsentSDK.nitro.ts +232 -0
- package/src/index.ts +133 -0
|
@@ -0,0 +1,285 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// SDK.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 `SDK`, backed by a C++ struct.
|
|
12
|
+
*/
|
|
13
|
+
public typealias SDK = margelo.nitro.securiticonsentsdk.SDK
|
|
14
|
+
|
|
15
|
+
public extension SDK {
|
|
16
|
+
private typealias bridge = margelo.nitro.securiticonsentsdk.bridge.swift
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Create a new instance of `SDK`.
|
|
20
|
+
*/
|
|
21
|
+
init(sdkId: Double?, namespaceId: String?, sdkName: String?, sdkDescription: String?, vendor: String?, logoBase64: String?, website: String?, matchedBy: [String]?, collectingData: Bool?) {
|
|
22
|
+
self.init({ () -> bridge.std__optional_double_ in
|
|
23
|
+
if let __unwrappedValue = sdkId {
|
|
24
|
+
return bridge.create_std__optional_double_(__unwrappedValue)
|
|
25
|
+
} else {
|
|
26
|
+
return .init()
|
|
27
|
+
}
|
|
28
|
+
}(), { () -> bridge.std__optional_std__string_ in
|
|
29
|
+
if let __unwrappedValue = namespaceId {
|
|
30
|
+
return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
|
|
31
|
+
} else {
|
|
32
|
+
return .init()
|
|
33
|
+
}
|
|
34
|
+
}(), { () -> bridge.std__optional_std__string_ in
|
|
35
|
+
if let __unwrappedValue = sdkName {
|
|
36
|
+
return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
|
|
37
|
+
} else {
|
|
38
|
+
return .init()
|
|
39
|
+
}
|
|
40
|
+
}(), { () -> bridge.std__optional_std__string_ in
|
|
41
|
+
if let __unwrappedValue = sdkDescription {
|
|
42
|
+
return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
|
|
43
|
+
} else {
|
|
44
|
+
return .init()
|
|
45
|
+
}
|
|
46
|
+
}(), { () -> bridge.std__optional_std__string_ in
|
|
47
|
+
if let __unwrappedValue = vendor {
|
|
48
|
+
return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
|
|
49
|
+
} else {
|
|
50
|
+
return .init()
|
|
51
|
+
}
|
|
52
|
+
}(), { () -> bridge.std__optional_std__string_ in
|
|
53
|
+
if let __unwrappedValue = logoBase64 {
|
|
54
|
+
return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
|
|
55
|
+
} else {
|
|
56
|
+
return .init()
|
|
57
|
+
}
|
|
58
|
+
}(), { () -> bridge.std__optional_std__string_ in
|
|
59
|
+
if let __unwrappedValue = website {
|
|
60
|
+
return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
|
|
61
|
+
} else {
|
|
62
|
+
return .init()
|
|
63
|
+
}
|
|
64
|
+
}(), { () -> bridge.std__optional_std__vector_std__string__ in
|
|
65
|
+
if let __unwrappedValue = matchedBy {
|
|
66
|
+
return bridge.create_std__optional_std__vector_std__string__({ () -> bridge.std__vector_std__string_ in
|
|
67
|
+
var __vector = bridge.create_std__vector_std__string_(__unwrappedValue.count)
|
|
68
|
+
for __item in __unwrappedValue {
|
|
69
|
+
__vector.push_back(std.string(__item))
|
|
70
|
+
}
|
|
71
|
+
return __vector
|
|
72
|
+
}())
|
|
73
|
+
} else {
|
|
74
|
+
return .init()
|
|
75
|
+
}
|
|
76
|
+
}(), { () -> bridge.std__optional_bool_ in
|
|
77
|
+
if let __unwrappedValue = collectingData {
|
|
78
|
+
return bridge.create_std__optional_bool_(__unwrappedValue)
|
|
79
|
+
} else {
|
|
80
|
+
return .init()
|
|
81
|
+
}
|
|
82
|
+
}())
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
var sdkId: Double? {
|
|
86
|
+
@inline(__always)
|
|
87
|
+
get {
|
|
88
|
+
return self.__sdkId.value
|
|
89
|
+
}
|
|
90
|
+
@inline(__always)
|
|
91
|
+
set {
|
|
92
|
+
self.__sdkId = { () -> bridge.std__optional_double_ in
|
|
93
|
+
if let __unwrappedValue = newValue {
|
|
94
|
+
return bridge.create_std__optional_double_(__unwrappedValue)
|
|
95
|
+
} else {
|
|
96
|
+
return .init()
|
|
97
|
+
}
|
|
98
|
+
}()
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
var namespaceId: String? {
|
|
103
|
+
@inline(__always)
|
|
104
|
+
get {
|
|
105
|
+
return { () -> String? in
|
|
106
|
+
if let __unwrapped = self.__namespaceId.value {
|
|
107
|
+
return String(__unwrapped)
|
|
108
|
+
} else {
|
|
109
|
+
return nil
|
|
110
|
+
}
|
|
111
|
+
}()
|
|
112
|
+
}
|
|
113
|
+
@inline(__always)
|
|
114
|
+
set {
|
|
115
|
+
self.__namespaceId = { () -> bridge.std__optional_std__string_ in
|
|
116
|
+
if let __unwrappedValue = newValue {
|
|
117
|
+
return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
|
|
118
|
+
} else {
|
|
119
|
+
return .init()
|
|
120
|
+
}
|
|
121
|
+
}()
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
var sdkName: String? {
|
|
126
|
+
@inline(__always)
|
|
127
|
+
get {
|
|
128
|
+
return { () -> String? in
|
|
129
|
+
if let __unwrapped = self.__sdkName.value {
|
|
130
|
+
return String(__unwrapped)
|
|
131
|
+
} else {
|
|
132
|
+
return nil
|
|
133
|
+
}
|
|
134
|
+
}()
|
|
135
|
+
}
|
|
136
|
+
@inline(__always)
|
|
137
|
+
set {
|
|
138
|
+
self.__sdkName = { () -> bridge.std__optional_std__string_ in
|
|
139
|
+
if let __unwrappedValue = newValue {
|
|
140
|
+
return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
|
|
141
|
+
} else {
|
|
142
|
+
return .init()
|
|
143
|
+
}
|
|
144
|
+
}()
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
var sdkDescription: String? {
|
|
149
|
+
@inline(__always)
|
|
150
|
+
get {
|
|
151
|
+
return { () -> String? in
|
|
152
|
+
if let __unwrapped = self.__sdkDescription.value {
|
|
153
|
+
return String(__unwrapped)
|
|
154
|
+
} else {
|
|
155
|
+
return nil
|
|
156
|
+
}
|
|
157
|
+
}()
|
|
158
|
+
}
|
|
159
|
+
@inline(__always)
|
|
160
|
+
set {
|
|
161
|
+
self.__sdkDescription = { () -> bridge.std__optional_std__string_ in
|
|
162
|
+
if let __unwrappedValue = newValue {
|
|
163
|
+
return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
|
|
164
|
+
} else {
|
|
165
|
+
return .init()
|
|
166
|
+
}
|
|
167
|
+
}()
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
var vendor: String? {
|
|
172
|
+
@inline(__always)
|
|
173
|
+
get {
|
|
174
|
+
return { () -> String? in
|
|
175
|
+
if let __unwrapped = self.__vendor.value {
|
|
176
|
+
return String(__unwrapped)
|
|
177
|
+
} else {
|
|
178
|
+
return nil
|
|
179
|
+
}
|
|
180
|
+
}()
|
|
181
|
+
}
|
|
182
|
+
@inline(__always)
|
|
183
|
+
set {
|
|
184
|
+
self.__vendor = { () -> bridge.std__optional_std__string_ in
|
|
185
|
+
if let __unwrappedValue = newValue {
|
|
186
|
+
return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
|
|
187
|
+
} else {
|
|
188
|
+
return .init()
|
|
189
|
+
}
|
|
190
|
+
}()
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
var logoBase64: String? {
|
|
195
|
+
@inline(__always)
|
|
196
|
+
get {
|
|
197
|
+
return { () -> String? in
|
|
198
|
+
if let __unwrapped = self.__logoBase64.value {
|
|
199
|
+
return String(__unwrapped)
|
|
200
|
+
} else {
|
|
201
|
+
return nil
|
|
202
|
+
}
|
|
203
|
+
}()
|
|
204
|
+
}
|
|
205
|
+
@inline(__always)
|
|
206
|
+
set {
|
|
207
|
+
self.__logoBase64 = { () -> bridge.std__optional_std__string_ in
|
|
208
|
+
if let __unwrappedValue = newValue {
|
|
209
|
+
return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
|
|
210
|
+
} else {
|
|
211
|
+
return .init()
|
|
212
|
+
}
|
|
213
|
+
}()
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
var website: String? {
|
|
218
|
+
@inline(__always)
|
|
219
|
+
get {
|
|
220
|
+
return { () -> String? in
|
|
221
|
+
if let __unwrapped = self.__website.value {
|
|
222
|
+
return String(__unwrapped)
|
|
223
|
+
} else {
|
|
224
|
+
return nil
|
|
225
|
+
}
|
|
226
|
+
}()
|
|
227
|
+
}
|
|
228
|
+
@inline(__always)
|
|
229
|
+
set {
|
|
230
|
+
self.__website = { () -> bridge.std__optional_std__string_ in
|
|
231
|
+
if let __unwrappedValue = newValue {
|
|
232
|
+
return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
|
|
233
|
+
} else {
|
|
234
|
+
return .init()
|
|
235
|
+
}
|
|
236
|
+
}()
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
var matchedBy: [String]? {
|
|
241
|
+
@inline(__always)
|
|
242
|
+
get {
|
|
243
|
+
return { () -> [String]? in
|
|
244
|
+
if let __unwrapped = self.__matchedBy.value {
|
|
245
|
+
return __unwrapped.map({ __item in String(__item) })
|
|
246
|
+
} else {
|
|
247
|
+
return nil
|
|
248
|
+
}
|
|
249
|
+
}()
|
|
250
|
+
}
|
|
251
|
+
@inline(__always)
|
|
252
|
+
set {
|
|
253
|
+
self.__matchedBy = { () -> bridge.std__optional_std__vector_std__string__ in
|
|
254
|
+
if let __unwrappedValue = newValue {
|
|
255
|
+
return bridge.create_std__optional_std__vector_std__string__({ () -> bridge.std__vector_std__string_ in
|
|
256
|
+
var __vector = bridge.create_std__vector_std__string_(__unwrappedValue.count)
|
|
257
|
+
for __item in __unwrappedValue {
|
|
258
|
+
__vector.push_back(std.string(__item))
|
|
259
|
+
}
|
|
260
|
+
return __vector
|
|
261
|
+
}())
|
|
262
|
+
} else {
|
|
263
|
+
return .init()
|
|
264
|
+
}
|
|
265
|
+
}()
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
var collectingData: Bool? {
|
|
270
|
+
@inline(__always)
|
|
271
|
+
get {
|
|
272
|
+
return self.__collectingData.value
|
|
273
|
+
}
|
|
274
|
+
@inline(__always)
|
|
275
|
+
set {
|
|
276
|
+
self.__collectingData = { () -> bridge.std__optional_bool_ in
|
|
277
|
+
if let __unwrappedValue = newValue {
|
|
278
|
+
return bridge.create_std__optional_bool_(__unwrappedValue)
|
|
279
|
+
} else {
|
|
280
|
+
return .init()
|
|
281
|
+
}
|
|
282
|
+
}()
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
}
|
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// SettingsPrompt.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 `SettingsPrompt`, backed by a C++ struct.
|
|
12
|
+
*/
|
|
13
|
+
public typealias SettingsPrompt = margelo.nitro.securiticonsentsdk.SettingsPrompt
|
|
14
|
+
|
|
15
|
+
public extension SettingsPrompt {
|
|
16
|
+
private typealias bridge = margelo.nitro.securiticonsentsdk.bridge.swift
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Create a new instance of `SettingsPrompt`.
|
|
20
|
+
*/
|
|
21
|
+
init(promptHeading: String?, promptMessage: String?, settingsButtonText: String?, notNowButtonText: String?, permissions: [String]?) {
|
|
22
|
+
self.init({ () -> bridge.std__optional_std__string_ in
|
|
23
|
+
if let __unwrappedValue = promptHeading {
|
|
24
|
+
return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
|
|
25
|
+
} else {
|
|
26
|
+
return .init()
|
|
27
|
+
}
|
|
28
|
+
}(), { () -> bridge.std__optional_std__string_ in
|
|
29
|
+
if let __unwrappedValue = promptMessage {
|
|
30
|
+
return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
|
|
31
|
+
} else {
|
|
32
|
+
return .init()
|
|
33
|
+
}
|
|
34
|
+
}(), { () -> bridge.std__optional_std__string_ in
|
|
35
|
+
if let __unwrappedValue = settingsButtonText {
|
|
36
|
+
return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
|
|
37
|
+
} else {
|
|
38
|
+
return .init()
|
|
39
|
+
}
|
|
40
|
+
}(), { () -> bridge.std__optional_std__string_ in
|
|
41
|
+
if let __unwrappedValue = notNowButtonText {
|
|
42
|
+
return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
|
|
43
|
+
} else {
|
|
44
|
+
return .init()
|
|
45
|
+
}
|
|
46
|
+
}(), { () -> bridge.std__optional_std__vector_std__string__ in
|
|
47
|
+
if let __unwrappedValue = permissions {
|
|
48
|
+
return bridge.create_std__optional_std__vector_std__string__({ () -> bridge.std__vector_std__string_ in
|
|
49
|
+
var __vector = bridge.create_std__vector_std__string_(__unwrappedValue.count)
|
|
50
|
+
for __item in __unwrappedValue {
|
|
51
|
+
__vector.push_back(std.string(__item))
|
|
52
|
+
}
|
|
53
|
+
return __vector
|
|
54
|
+
}())
|
|
55
|
+
} else {
|
|
56
|
+
return .init()
|
|
57
|
+
}
|
|
58
|
+
}())
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
var promptHeading: String? {
|
|
62
|
+
@inline(__always)
|
|
63
|
+
get {
|
|
64
|
+
return { () -> String? in
|
|
65
|
+
if let __unwrapped = self.__promptHeading.value {
|
|
66
|
+
return String(__unwrapped)
|
|
67
|
+
} else {
|
|
68
|
+
return nil
|
|
69
|
+
}
|
|
70
|
+
}()
|
|
71
|
+
}
|
|
72
|
+
@inline(__always)
|
|
73
|
+
set {
|
|
74
|
+
self.__promptHeading = { () -> bridge.std__optional_std__string_ in
|
|
75
|
+
if let __unwrappedValue = newValue {
|
|
76
|
+
return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
|
|
77
|
+
} else {
|
|
78
|
+
return .init()
|
|
79
|
+
}
|
|
80
|
+
}()
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
var promptMessage: String? {
|
|
85
|
+
@inline(__always)
|
|
86
|
+
get {
|
|
87
|
+
return { () -> String? in
|
|
88
|
+
if let __unwrapped = self.__promptMessage.value {
|
|
89
|
+
return String(__unwrapped)
|
|
90
|
+
} else {
|
|
91
|
+
return nil
|
|
92
|
+
}
|
|
93
|
+
}()
|
|
94
|
+
}
|
|
95
|
+
@inline(__always)
|
|
96
|
+
set {
|
|
97
|
+
self.__promptMessage = { () -> bridge.std__optional_std__string_ in
|
|
98
|
+
if let __unwrappedValue = newValue {
|
|
99
|
+
return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
|
|
100
|
+
} else {
|
|
101
|
+
return .init()
|
|
102
|
+
}
|
|
103
|
+
}()
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
var settingsButtonText: String? {
|
|
108
|
+
@inline(__always)
|
|
109
|
+
get {
|
|
110
|
+
return { () -> String? in
|
|
111
|
+
if let __unwrapped = self.__settingsButtonText.value {
|
|
112
|
+
return String(__unwrapped)
|
|
113
|
+
} else {
|
|
114
|
+
return nil
|
|
115
|
+
}
|
|
116
|
+
}()
|
|
117
|
+
}
|
|
118
|
+
@inline(__always)
|
|
119
|
+
set {
|
|
120
|
+
self.__settingsButtonText = { () -> bridge.std__optional_std__string_ in
|
|
121
|
+
if let __unwrappedValue = newValue {
|
|
122
|
+
return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
|
|
123
|
+
} else {
|
|
124
|
+
return .init()
|
|
125
|
+
}
|
|
126
|
+
}()
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
var notNowButtonText: String? {
|
|
131
|
+
@inline(__always)
|
|
132
|
+
get {
|
|
133
|
+
return { () -> String? in
|
|
134
|
+
if let __unwrapped = self.__notNowButtonText.value {
|
|
135
|
+
return String(__unwrapped)
|
|
136
|
+
} else {
|
|
137
|
+
return nil
|
|
138
|
+
}
|
|
139
|
+
}()
|
|
140
|
+
}
|
|
141
|
+
@inline(__always)
|
|
142
|
+
set {
|
|
143
|
+
self.__notNowButtonText = { () -> bridge.std__optional_std__string_ in
|
|
144
|
+
if let __unwrappedValue = newValue {
|
|
145
|
+
return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
|
|
146
|
+
} else {
|
|
147
|
+
return .init()
|
|
148
|
+
}
|
|
149
|
+
}()
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
var permissions: [String]? {
|
|
154
|
+
@inline(__always)
|
|
155
|
+
get {
|
|
156
|
+
return { () -> [String]? in
|
|
157
|
+
if let __unwrapped = self.__permissions.value {
|
|
158
|
+
return __unwrapped.map({ __item in String(__item) })
|
|
159
|
+
} else {
|
|
160
|
+
return nil
|
|
161
|
+
}
|
|
162
|
+
}()
|
|
163
|
+
}
|
|
164
|
+
@inline(__always)
|
|
165
|
+
set {
|
|
166
|
+
self.__permissions = { () -> bridge.std__optional_std__vector_std__string__ in
|
|
167
|
+
if let __unwrappedValue = newValue {
|
|
168
|
+
return bridge.create_std__optional_std__vector_std__string__({ () -> bridge.std__vector_std__string_ in
|
|
169
|
+
var __vector = bridge.create_std__vector_std__string_(__unwrappedValue.count)
|
|
170
|
+
for __item in __unwrappedValue {
|
|
171
|
+
__vector.push_back(std.string(__item))
|
|
172
|
+
}
|
|
173
|
+
return __vector
|
|
174
|
+
}())
|
|
175
|
+
} else {
|
|
176
|
+
return .init()
|
|
177
|
+
}
|
|
178
|
+
}()
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// AppPermission.hpp
|
|
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
|
+
#pragma once
|
|
9
|
+
|
|
10
|
+
#if __has_include(<NitroModules/JSIConverter.hpp>)
|
|
11
|
+
#include <NitroModules/JSIConverter.hpp>
|
|
12
|
+
#else
|
|
13
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
14
|
+
#endif
|
|
15
|
+
#if __has_include(<NitroModules/NitroDefines.hpp>)
|
|
16
|
+
#include <NitroModules/NitroDefines.hpp>
|
|
17
|
+
#else
|
|
18
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
19
|
+
#endif
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
#include <optional>
|
|
24
|
+
#include <string>
|
|
25
|
+
|
|
26
|
+
namespace margelo::nitro::securiticonsentsdk {
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* A struct which can be represented as a JavaScript object (AppPermission).
|
|
30
|
+
*/
|
|
31
|
+
struct AppPermission {
|
|
32
|
+
public:
|
|
33
|
+
std::optional<double> id SWIFT_PRIVATE;
|
|
34
|
+
std::optional<std::string> name SWIFT_PRIVATE;
|
|
35
|
+
std::optional<std::string> permissionId SWIFT_PRIVATE;
|
|
36
|
+
std::optional<std::string> description SWIFT_PRIVATE;
|
|
37
|
+
std::optional<std::string> group SWIFT_PRIVATE;
|
|
38
|
+
std::optional<double> groupId SWIFT_PRIVATE;
|
|
39
|
+
std::optional<std::string> consentStatus SWIFT_PRIVATE;
|
|
40
|
+
std::optional<std::string> nameMap SWIFT_PRIVATE;
|
|
41
|
+
std::optional<bool> isSettingsPromptEnabled SWIFT_PRIVATE;
|
|
42
|
+
|
|
43
|
+
public:
|
|
44
|
+
AppPermission() = default;
|
|
45
|
+
explicit AppPermission(std::optional<double> id, std::optional<std::string> name, std::optional<std::string> permissionId, std::optional<std::string> description, std::optional<std::string> group, std::optional<double> groupId, std::optional<std::string> consentStatus, std::optional<std::string> nameMap, std::optional<bool> isSettingsPromptEnabled): id(id), name(name), permissionId(permissionId), description(description), group(group), groupId(groupId), consentStatus(consentStatus), nameMap(nameMap), isSettingsPromptEnabled(isSettingsPromptEnabled) {}
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
} // namespace margelo::nitro::securiticonsentsdk
|
|
49
|
+
|
|
50
|
+
namespace margelo::nitro {
|
|
51
|
+
|
|
52
|
+
using namespace margelo::nitro::securiticonsentsdk;
|
|
53
|
+
|
|
54
|
+
// C++ AppPermission <> JS AppPermission (object)
|
|
55
|
+
template <>
|
|
56
|
+
struct JSIConverter<AppPermission> final {
|
|
57
|
+
static inline AppPermission fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
58
|
+
jsi::Object obj = arg.asObject(runtime);
|
|
59
|
+
return AppPermission(
|
|
60
|
+
JSIConverter<std::optional<double>>::fromJSI(runtime, obj.getProperty(runtime, "id")),
|
|
61
|
+
JSIConverter<std::optional<std::string>>::fromJSI(runtime, obj.getProperty(runtime, "name")),
|
|
62
|
+
JSIConverter<std::optional<std::string>>::fromJSI(runtime, obj.getProperty(runtime, "permissionId")),
|
|
63
|
+
JSIConverter<std::optional<std::string>>::fromJSI(runtime, obj.getProperty(runtime, "description")),
|
|
64
|
+
JSIConverter<std::optional<std::string>>::fromJSI(runtime, obj.getProperty(runtime, "group")),
|
|
65
|
+
JSIConverter<std::optional<double>>::fromJSI(runtime, obj.getProperty(runtime, "groupId")),
|
|
66
|
+
JSIConverter<std::optional<std::string>>::fromJSI(runtime, obj.getProperty(runtime, "consentStatus")),
|
|
67
|
+
JSIConverter<std::optional<std::string>>::fromJSI(runtime, obj.getProperty(runtime, "nameMap")),
|
|
68
|
+
JSIConverter<std::optional<bool>>::fromJSI(runtime, obj.getProperty(runtime, "isSettingsPromptEnabled"))
|
|
69
|
+
);
|
|
70
|
+
}
|
|
71
|
+
static inline jsi::Value toJSI(jsi::Runtime& runtime, const AppPermission& arg) {
|
|
72
|
+
jsi::Object obj(runtime);
|
|
73
|
+
obj.setProperty(runtime, "id", JSIConverter<std::optional<double>>::toJSI(runtime, arg.id));
|
|
74
|
+
obj.setProperty(runtime, "name", JSIConverter<std::optional<std::string>>::toJSI(runtime, arg.name));
|
|
75
|
+
obj.setProperty(runtime, "permissionId", JSIConverter<std::optional<std::string>>::toJSI(runtime, arg.permissionId));
|
|
76
|
+
obj.setProperty(runtime, "description", JSIConverter<std::optional<std::string>>::toJSI(runtime, arg.description));
|
|
77
|
+
obj.setProperty(runtime, "group", JSIConverter<std::optional<std::string>>::toJSI(runtime, arg.group));
|
|
78
|
+
obj.setProperty(runtime, "groupId", JSIConverter<std::optional<double>>::toJSI(runtime, arg.groupId));
|
|
79
|
+
obj.setProperty(runtime, "consentStatus", JSIConverter<std::optional<std::string>>::toJSI(runtime, arg.consentStatus));
|
|
80
|
+
obj.setProperty(runtime, "nameMap", JSIConverter<std::optional<std::string>>::toJSI(runtime, arg.nameMap));
|
|
81
|
+
obj.setProperty(runtime, "isSettingsPromptEnabled", JSIConverter<std::optional<bool>>::toJSI(runtime, arg.isSettingsPromptEnabled));
|
|
82
|
+
return obj;
|
|
83
|
+
}
|
|
84
|
+
static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
|
|
85
|
+
if (!value.isObject()) {
|
|
86
|
+
return false;
|
|
87
|
+
}
|
|
88
|
+
jsi::Object obj = value.getObject(runtime);
|
|
89
|
+
if (!JSIConverter<std::optional<double>>::canConvert(runtime, obj.getProperty(runtime, "id"))) return false;
|
|
90
|
+
if (!JSIConverter<std::optional<std::string>>::canConvert(runtime, obj.getProperty(runtime, "name"))) return false;
|
|
91
|
+
if (!JSIConverter<std::optional<std::string>>::canConvert(runtime, obj.getProperty(runtime, "permissionId"))) return false;
|
|
92
|
+
if (!JSIConverter<std::optional<std::string>>::canConvert(runtime, obj.getProperty(runtime, "description"))) return false;
|
|
93
|
+
if (!JSIConverter<std::optional<std::string>>::canConvert(runtime, obj.getProperty(runtime, "group"))) return false;
|
|
94
|
+
if (!JSIConverter<std::optional<double>>::canConvert(runtime, obj.getProperty(runtime, "groupId"))) return false;
|
|
95
|
+
if (!JSIConverter<std::optional<std::string>>::canConvert(runtime, obj.getProperty(runtime, "consentStatus"))) return false;
|
|
96
|
+
if (!JSIConverter<std::optional<std::string>>::canConvert(runtime, obj.getProperty(runtime, "nameMap"))) return false;
|
|
97
|
+
if (!JSIConverter<std::optional<bool>>::canConvert(runtime, obj.getProperty(runtime, "isSettingsPromptEnabled"))) return false;
|
|
98
|
+
return true;
|
|
99
|
+
}
|
|
100
|
+
};
|
|
101
|
+
|
|
102
|
+
} // namespace margelo::nitro
|