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,57 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// PermissionConsent.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 `PermissionConsent`, backed by a C++ struct.
|
|
12
|
+
*/
|
|
13
|
+
public typealias PermissionConsent = margelo.nitro.securiticonsentsdk.PermissionConsent
|
|
14
|
+
|
|
15
|
+
public extension PermissionConsent {
|
|
16
|
+
private typealias bridge = margelo.nitro.securiticonsentsdk.bridge.swift
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Create a new instance of `PermissionConsent`.
|
|
20
|
+
*/
|
|
21
|
+
init(permission: String, consentStatus: String, timestamp: Double) {
|
|
22
|
+
self.init(std.string(permission), std.string(consentStatus), timestamp)
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
var permission: String {
|
|
26
|
+
@inline(__always)
|
|
27
|
+
get {
|
|
28
|
+
return String(self.__permission)
|
|
29
|
+
}
|
|
30
|
+
@inline(__always)
|
|
31
|
+
set {
|
|
32
|
+
self.__permission = std.string(newValue)
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
var consentStatus: String {
|
|
37
|
+
@inline(__always)
|
|
38
|
+
get {
|
|
39
|
+
return String(self.__consentStatus)
|
|
40
|
+
}
|
|
41
|
+
@inline(__always)
|
|
42
|
+
set {
|
|
43
|
+
self.__consentStatus = std.string(newValue)
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
var timestamp: Double {
|
|
48
|
+
@inline(__always)
|
|
49
|
+
get {
|
|
50
|
+
return self.__timestamp
|
|
51
|
+
}
|
|
52
|
+
@inline(__always)
|
|
53
|
+
set {
|
|
54
|
+
self.__timestamp = newValue
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
@@ -0,0 +1,216 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// PostConsentsRequest.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 `PostConsentsRequest`, backed by a C++ struct.
|
|
12
|
+
*/
|
|
13
|
+
public typealias PostConsentsRequest = margelo.nitro.securiticonsentsdk.PostConsentsRequest
|
|
14
|
+
|
|
15
|
+
public extension PostConsentsRequest {
|
|
16
|
+
private typealias bridge = margelo.nitro.securiticonsentsdk.bridge.swift
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Create a new instance of `PostConsentsRequest`.
|
|
20
|
+
*/
|
|
21
|
+
init(uuid: String, appUUID: String, device: String, implicitConsent: Bool, version: Double, purposeConsents: [PurposeConsent], permissions: [PermissionConsent], isTestMode: Bool, adId: String, bannerInfo: String, sdkVersion: String?, platform: String?) {
|
|
22
|
+
self.init(std.string(uuid), std.string(appUUID), std.string(device), implicitConsent, version, { () -> bridge.std__vector_PurposeConsent_ in
|
|
23
|
+
var __vector = bridge.create_std__vector_PurposeConsent_(purposeConsents.count)
|
|
24
|
+
for __item in purposeConsents {
|
|
25
|
+
__vector.push_back(__item)
|
|
26
|
+
}
|
|
27
|
+
return __vector
|
|
28
|
+
}(), { () -> bridge.std__vector_PermissionConsent_ in
|
|
29
|
+
var __vector = bridge.create_std__vector_PermissionConsent_(permissions.count)
|
|
30
|
+
for __item in permissions {
|
|
31
|
+
__vector.push_back(__item)
|
|
32
|
+
}
|
|
33
|
+
return __vector
|
|
34
|
+
}(), isTestMode, std.string(adId), std.string(bannerInfo), { () -> bridge.std__optional_std__string_ in
|
|
35
|
+
if let __unwrappedValue = sdkVersion {
|
|
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 = platform {
|
|
42
|
+
return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
|
|
43
|
+
} else {
|
|
44
|
+
return .init()
|
|
45
|
+
}
|
|
46
|
+
}())
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
var uuid: String {
|
|
50
|
+
@inline(__always)
|
|
51
|
+
get {
|
|
52
|
+
return String(self.__uuid)
|
|
53
|
+
}
|
|
54
|
+
@inline(__always)
|
|
55
|
+
set {
|
|
56
|
+
self.__uuid = std.string(newValue)
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
var appUUID: String {
|
|
61
|
+
@inline(__always)
|
|
62
|
+
get {
|
|
63
|
+
return String(self.__appUUID)
|
|
64
|
+
}
|
|
65
|
+
@inline(__always)
|
|
66
|
+
set {
|
|
67
|
+
self.__appUUID = std.string(newValue)
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
var device: String {
|
|
72
|
+
@inline(__always)
|
|
73
|
+
get {
|
|
74
|
+
return String(self.__device)
|
|
75
|
+
}
|
|
76
|
+
@inline(__always)
|
|
77
|
+
set {
|
|
78
|
+
self.__device = std.string(newValue)
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
var implicitConsent: Bool {
|
|
83
|
+
@inline(__always)
|
|
84
|
+
get {
|
|
85
|
+
return self.__implicitConsent
|
|
86
|
+
}
|
|
87
|
+
@inline(__always)
|
|
88
|
+
set {
|
|
89
|
+
self.__implicitConsent = newValue
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
var version: Double {
|
|
94
|
+
@inline(__always)
|
|
95
|
+
get {
|
|
96
|
+
return self.__version
|
|
97
|
+
}
|
|
98
|
+
@inline(__always)
|
|
99
|
+
set {
|
|
100
|
+
self.__version = newValue
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
var purposeConsents: [PurposeConsent] {
|
|
105
|
+
@inline(__always)
|
|
106
|
+
get {
|
|
107
|
+
return self.__purposeConsents.map({ __item in __item })
|
|
108
|
+
}
|
|
109
|
+
@inline(__always)
|
|
110
|
+
set {
|
|
111
|
+
self.__purposeConsents = { () -> bridge.std__vector_PurposeConsent_ in
|
|
112
|
+
var __vector = bridge.create_std__vector_PurposeConsent_(newValue.count)
|
|
113
|
+
for __item in newValue {
|
|
114
|
+
__vector.push_back(__item)
|
|
115
|
+
}
|
|
116
|
+
return __vector
|
|
117
|
+
}()
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
var permissions: [PermissionConsent] {
|
|
122
|
+
@inline(__always)
|
|
123
|
+
get {
|
|
124
|
+
return self.__permissions.map({ __item in __item })
|
|
125
|
+
}
|
|
126
|
+
@inline(__always)
|
|
127
|
+
set {
|
|
128
|
+
self.__permissions = { () -> bridge.std__vector_PermissionConsent_ in
|
|
129
|
+
var __vector = bridge.create_std__vector_PermissionConsent_(newValue.count)
|
|
130
|
+
for __item in newValue {
|
|
131
|
+
__vector.push_back(__item)
|
|
132
|
+
}
|
|
133
|
+
return __vector
|
|
134
|
+
}()
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
var isTestMode: Bool {
|
|
139
|
+
@inline(__always)
|
|
140
|
+
get {
|
|
141
|
+
return self.__isTestMode
|
|
142
|
+
}
|
|
143
|
+
@inline(__always)
|
|
144
|
+
set {
|
|
145
|
+
self.__isTestMode = newValue
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
var adId: String {
|
|
150
|
+
@inline(__always)
|
|
151
|
+
get {
|
|
152
|
+
return String(self.__adId)
|
|
153
|
+
}
|
|
154
|
+
@inline(__always)
|
|
155
|
+
set {
|
|
156
|
+
self.__adId = std.string(newValue)
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
var bannerInfo: String {
|
|
161
|
+
@inline(__always)
|
|
162
|
+
get {
|
|
163
|
+
return String(self.__bannerInfo)
|
|
164
|
+
}
|
|
165
|
+
@inline(__always)
|
|
166
|
+
set {
|
|
167
|
+
self.__bannerInfo = std.string(newValue)
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
var sdkVersion: String? {
|
|
172
|
+
@inline(__always)
|
|
173
|
+
get {
|
|
174
|
+
return { () -> String? in
|
|
175
|
+
if let __unwrapped = self.__sdkVersion.value {
|
|
176
|
+
return String(__unwrapped)
|
|
177
|
+
} else {
|
|
178
|
+
return nil
|
|
179
|
+
}
|
|
180
|
+
}()
|
|
181
|
+
}
|
|
182
|
+
@inline(__always)
|
|
183
|
+
set {
|
|
184
|
+
self.__sdkVersion = { () -> 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 platform: String? {
|
|
195
|
+
@inline(__always)
|
|
196
|
+
get {
|
|
197
|
+
return { () -> String? in
|
|
198
|
+
if let __unwrapped = self.__platform.value {
|
|
199
|
+
return String(__unwrapped)
|
|
200
|
+
} else {
|
|
201
|
+
return nil
|
|
202
|
+
}
|
|
203
|
+
}()
|
|
204
|
+
}
|
|
205
|
+
@inline(__always)
|
|
206
|
+
set {
|
|
207
|
+
self.__platform = { () -> 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
|
+
}
|
|
@@ -0,0 +1,354 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// Purpose.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 `Purpose`, backed by a C++ struct.
|
|
12
|
+
*/
|
|
13
|
+
public typealias Purpose = margelo.nitro.securiticonsentsdk.Purpose
|
|
14
|
+
|
|
15
|
+
public extension Purpose {
|
|
16
|
+
private typealias bridge = margelo.nitro.securiticonsentsdk.bridge.swift
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Create a new instance of `Purpose`.
|
|
20
|
+
*/
|
|
21
|
+
init(purposeId: Double?, purposeName: String?, purposeDescription: String?, sdks: [SDK]?, consentStatus: String?, disableOptOut: Bool?, optOutText: String?, hideDetails: Bool?, isGADMapped: Bool?, gadDescription: String?, isATTMapped: Bool?, attDescription: String?) {
|
|
22
|
+
self.init({ () -> bridge.std__optional_double_ in
|
|
23
|
+
if let __unwrappedValue = purposeId {
|
|
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 = purposeName {
|
|
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 = purposeDescription {
|
|
36
|
+
return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
|
|
37
|
+
} else {
|
|
38
|
+
return .init()
|
|
39
|
+
}
|
|
40
|
+
}(), { () -> bridge.std__optional_std__vector_SDK__ in
|
|
41
|
+
if let __unwrappedValue = sdks {
|
|
42
|
+
return bridge.create_std__optional_std__vector_SDK__({ () -> bridge.std__vector_SDK_ in
|
|
43
|
+
var __vector = bridge.create_std__vector_SDK_(__unwrappedValue.count)
|
|
44
|
+
for __item in __unwrappedValue {
|
|
45
|
+
__vector.push_back(__item)
|
|
46
|
+
}
|
|
47
|
+
return __vector
|
|
48
|
+
}())
|
|
49
|
+
} else {
|
|
50
|
+
return .init()
|
|
51
|
+
}
|
|
52
|
+
}(), { () -> bridge.std__optional_std__string_ in
|
|
53
|
+
if let __unwrappedValue = consentStatus {
|
|
54
|
+
return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
|
|
55
|
+
} else {
|
|
56
|
+
return .init()
|
|
57
|
+
}
|
|
58
|
+
}(), { () -> bridge.std__optional_bool_ in
|
|
59
|
+
if let __unwrappedValue = disableOptOut {
|
|
60
|
+
return bridge.create_std__optional_bool_(__unwrappedValue)
|
|
61
|
+
} else {
|
|
62
|
+
return .init()
|
|
63
|
+
}
|
|
64
|
+
}(), { () -> bridge.std__optional_std__string_ in
|
|
65
|
+
if let __unwrappedValue = optOutText {
|
|
66
|
+
return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
|
|
67
|
+
} else {
|
|
68
|
+
return .init()
|
|
69
|
+
}
|
|
70
|
+
}(), { () -> bridge.std__optional_bool_ in
|
|
71
|
+
if let __unwrappedValue = hideDetails {
|
|
72
|
+
return bridge.create_std__optional_bool_(__unwrappedValue)
|
|
73
|
+
} else {
|
|
74
|
+
return .init()
|
|
75
|
+
}
|
|
76
|
+
}(), { () -> bridge.std__optional_bool_ in
|
|
77
|
+
if let __unwrappedValue = isGADMapped {
|
|
78
|
+
return bridge.create_std__optional_bool_(__unwrappedValue)
|
|
79
|
+
} else {
|
|
80
|
+
return .init()
|
|
81
|
+
}
|
|
82
|
+
}(), { () -> bridge.std__optional_std__string_ in
|
|
83
|
+
if let __unwrappedValue = gadDescription {
|
|
84
|
+
return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
|
|
85
|
+
} else {
|
|
86
|
+
return .init()
|
|
87
|
+
}
|
|
88
|
+
}(), { () -> bridge.std__optional_bool_ in
|
|
89
|
+
if let __unwrappedValue = isATTMapped {
|
|
90
|
+
return bridge.create_std__optional_bool_(__unwrappedValue)
|
|
91
|
+
} else {
|
|
92
|
+
return .init()
|
|
93
|
+
}
|
|
94
|
+
}(), { () -> bridge.std__optional_std__string_ in
|
|
95
|
+
if let __unwrappedValue = attDescription {
|
|
96
|
+
return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
|
|
97
|
+
} else {
|
|
98
|
+
return .init()
|
|
99
|
+
}
|
|
100
|
+
}())
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
var purposeId: Double? {
|
|
104
|
+
@inline(__always)
|
|
105
|
+
get {
|
|
106
|
+
return self.__purposeId.value
|
|
107
|
+
}
|
|
108
|
+
@inline(__always)
|
|
109
|
+
set {
|
|
110
|
+
self.__purposeId = { () -> bridge.std__optional_double_ in
|
|
111
|
+
if let __unwrappedValue = newValue {
|
|
112
|
+
return bridge.create_std__optional_double_(__unwrappedValue)
|
|
113
|
+
} else {
|
|
114
|
+
return .init()
|
|
115
|
+
}
|
|
116
|
+
}()
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
var purposeName: String? {
|
|
121
|
+
@inline(__always)
|
|
122
|
+
get {
|
|
123
|
+
return { () -> String? in
|
|
124
|
+
if let __unwrapped = self.__purposeName.value {
|
|
125
|
+
return String(__unwrapped)
|
|
126
|
+
} else {
|
|
127
|
+
return nil
|
|
128
|
+
}
|
|
129
|
+
}()
|
|
130
|
+
}
|
|
131
|
+
@inline(__always)
|
|
132
|
+
set {
|
|
133
|
+
self.__purposeName = { () -> bridge.std__optional_std__string_ in
|
|
134
|
+
if let __unwrappedValue = newValue {
|
|
135
|
+
return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
|
|
136
|
+
} else {
|
|
137
|
+
return .init()
|
|
138
|
+
}
|
|
139
|
+
}()
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
var purposeDescription: String? {
|
|
144
|
+
@inline(__always)
|
|
145
|
+
get {
|
|
146
|
+
return { () -> String? in
|
|
147
|
+
if let __unwrapped = self.__purposeDescription.value {
|
|
148
|
+
return String(__unwrapped)
|
|
149
|
+
} else {
|
|
150
|
+
return nil
|
|
151
|
+
}
|
|
152
|
+
}()
|
|
153
|
+
}
|
|
154
|
+
@inline(__always)
|
|
155
|
+
set {
|
|
156
|
+
self.__purposeDescription = { () -> bridge.std__optional_std__string_ in
|
|
157
|
+
if let __unwrappedValue = newValue {
|
|
158
|
+
return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
|
|
159
|
+
} else {
|
|
160
|
+
return .init()
|
|
161
|
+
}
|
|
162
|
+
}()
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
var sdks: [SDK]? {
|
|
167
|
+
@inline(__always)
|
|
168
|
+
get {
|
|
169
|
+
return { () -> [SDK]? in
|
|
170
|
+
if let __unwrapped = self.__sdks.value {
|
|
171
|
+
return __unwrapped.map({ __item in __item })
|
|
172
|
+
} else {
|
|
173
|
+
return nil
|
|
174
|
+
}
|
|
175
|
+
}()
|
|
176
|
+
}
|
|
177
|
+
@inline(__always)
|
|
178
|
+
set {
|
|
179
|
+
self.__sdks = { () -> bridge.std__optional_std__vector_SDK__ in
|
|
180
|
+
if let __unwrappedValue = newValue {
|
|
181
|
+
return bridge.create_std__optional_std__vector_SDK__({ () -> bridge.std__vector_SDK_ in
|
|
182
|
+
var __vector = bridge.create_std__vector_SDK_(__unwrappedValue.count)
|
|
183
|
+
for __item in __unwrappedValue {
|
|
184
|
+
__vector.push_back(__item)
|
|
185
|
+
}
|
|
186
|
+
return __vector
|
|
187
|
+
}())
|
|
188
|
+
} else {
|
|
189
|
+
return .init()
|
|
190
|
+
}
|
|
191
|
+
}()
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
var consentStatus: String? {
|
|
196
|
+
@inline(__always)
|
|
197
|
+
get {
|
|
198
|
+
return { () -> String? in
|
|
199
|
+
if let __unwrapped = self.__consentStatus.value {
|
|
200
|
+
return String(__unwrapped)
|
|
201
|
+
} else {
|
|
202
|
+
return nil
|
|
203
|
+
}
|
|
204
|
+
}()
|
|
205
|
+
}
|
|
206
|
+
@inline(__always)
|
|
207
|
+
set {
|
|
208
|
+
self.__consentStatus = { () -> bridge.std__optional_std__string_ in
|
|
209
|
+
if let __unwrappedValue = newValue {
|
|
210
|
+
return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
|
|
211
|
+
} else {
|
|
212
|
+
return .init()
|
|
213
|
+
}
|
|
214
|
+
}()
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
var disableOptOut: Bool? {
|
|
219
|
+
@inline(__always)
|
|
220
|
+
get {
|
|
221
|
+
return self.__disableOptOut.value
|
|
222
|
+
}
|
|
223
|
+
@inline(__always)
|
|
224
|
+
set {
|
|
225
|
+
self.__disableOptOut = { () -> bridge.std__optional_bool_ in
|
|
226
|
+
if let __unwrappedValue = newValue {
|
|
227
|
+
return bridge.create_std__optional_bool_(__unwrappedValue)
|
|
228
|
+
} else {
|
|
229
|
+
return .init()
|
|
230
|
+
}
|
|
231
|
+
}()
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
var optOutText: String? {
|
|
236
|
+
@inline(__always)
|
|
237
|
+
get {
|
|
238
|
+
return { () -> String? in
|
|
239
|
+
if let __unwrapped = self.__optOutText.value {
|
|
240
|
+
return String(__unwrapped)
|
|
241
|
+
} else {
|
|
242
|
+
return nil
|
|
243
|
+
}
|
|
244
|
+
}()
|
|
245
|
+
}
|
|
246
|
+
@inline(__always)
|
|
247
|
+
set {
|
|
248
|
+
self.__optOutText = { () -> bridge.std__optional_std__string_ in
|
|
249
|
+
if let __unwrappedValue = newValue {
|
|
250
|
+
return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
|
|
251
|
+
} else {
|
|
252
|
+
return .init()
|
|
253
|
+
}
|
|
254
|
+
}()
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
var hideDetails: Bool? {
|
|
259
|
+
@inline(__always)
|
|
260
|
+
get {
|
|
261
|
+
return self.__hideDetails.value
|
|
262
|
+
}
|
|
263
|
+
@inline(__always)
|
|
264
|
+
set {
|
|
265
|
+
self.__hideDetails = { () -> bridge.std__optional_bool_ in
|
|
266
|
+
if let __unwrappedValue = newValue {
|
|
267
|
+
return bridge.create_std__optional_bool_(__unwrappedValue)
|
|
268
|
+
} else {
|
|
269
|
+
return .init()
|
|
270
|
+
}
|
|
271
|
+
}()
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
var isGADMapped: Bool? {
|
|
276
|
+
@inline(__always)
|
|
277
|
+
get {
|
|
278
|
+
return self.__isGADMapped.value
|
|
279
|
+
}
|
|
280
|
+
@inline(__always)
|
|
281
|
+
set {
|
|
282
|
+
self.__isGADMapped = { () -> bridge.std__optional_bool_ in
|
|
283
|
+
if let __unwrappedValue = newValue {
|
|
284
|
+
return bridge.create_std__optional_bool_(__unwrappedValue)
|
|
285
|
+
} else {
|
|
286
|
+
return .init()
|
|
287
|
+
}
|
|
288
|
+
}()
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
var gadDescription: String? {
|
|
293
|
+
@inline(__always)
|
|
294
|
+
get {
|
|
295
|
+
return { () -> String? in
|
|
296
|
+
if let __unwrapped = self.__gadDescription.value {
|
|
297
|
+
return String(__unwrapped)
|
|
298
|
+
} else {
|
|
299
|
+
return nil
|
|
300
|
+
}
|
|
301
|
+
}()
|
|
302
|
+
}
|
|
303
|
+
@inline(__always)
|
|
304
|
+
set {
|
|
305
|
+
self.__gadDescription = { () -> bridge.std__optional_std__string_ in
|
|
306
|
+
if let __unwrappedValue = newValue {
|
|
307
|
+
return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
|
|
308
|
+
} else {
|
|
309
|
+
return .init()
|
|
310
|
+
}
|
|
311
|
+
}()
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
var isATTMapped: Bool? {
|
|
316
|
+
@inline(__always)
|
|
317
|
+
get {
|
|
318
|
+
return self.__isATTMapped.value
|
|
319
|
+
}
|
|
320
|
+
@inline(__always)
|
|
321
|
+
set {
|
|
322
|
+
self.__isATTMapped = { () -> bridge.std__optional_bool_ in
|
|
323
|
+
if let __unwrappedValue = newValue {
|
|
324
|
+
return bridge.create_std__optional_bool_(__unwrappedValue)
|
|
325
|
+
} else {
|
|
326
|
+
return .init()
|
|
327
|
+
}
|
|
328
|
+
}()
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
var attDescription: String? {
|
|
333
|
+
@inline(__always)
|
|
334
|
+
get {
|
|
335
|
+
return { () -> String? in
|
|
336
|
+
if let __unwrapped = self.__attDescription.value {
|
|
337
|
+
return String(__unwrapped)
|
|
338
|
+
} else {
|
|
339
|
+
return nil
|
|
340
|
+
}
|
|
341
|
+
}()
|
|
342
|
+
}
|
|
343
|
+
@inline(__always)
|
|
344
|
+
set {
|
|
345
|
+
self.__attDescription = { () -> bridge.std__optional_std__string_ in
|
|
346
|
+
if let __unwrappedValue = newValue {
|
|
347
|
+
return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
|
|
348
|
+
} else {
|
|
349
|
+
return .init()
|
|
350
|
+
}
|
|
351
|
+
}()
|
|
352
|
+
}
|
|
353
|
+
}
|
|
354
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// PurposeConsent.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 `PurposeConsent`, backed by a C++ struct.
|
|
12
|
+
*/
|
|
13
|
+
public typealias PurposeConsent = margelo.nitro.securiticonsentsdk.PurposeConsent
|
|
14
|
+
|
|
15
|
+
public extension PurposeConsent {
|
|
16
|
+
private typealias bridge = margelo.nitro.securiticonsentsdk.bridge.swift
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Create a new instance of `PurposeConsent`.
|
|
20
|
+
*/
|
|
21
|
+
init(purposeID: Double, consentStatus: String, timestamp: Double, isEssential: Bool) {
|
|
22
|
+
self.init(purposeID, std.string(consentStatus), timestamp, isEssential)
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
var purposeID: Double {
|
|
26
|
+
@inline(__always)
|
|
27
|
+
get {
|
|
28
|
+
return self.__purposeID
|
|
29
|
+
}
|
|
30
|
+
@inline(__always)
|
|
31
|
+
set {
|
|
32
|
+
self.__purposeID = newValue
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
var consentStatus: String {
|
|
37
|
+
@inline(__always)
|
|
38
|
+
get {
|
|
39
|
+
return String(self.__consentStatus)
|
|
40
|
+
}
|
|
41
|
+
@inline(__always)
|
|
42
|
+
set {
|
|
43
|
+
self.__consentStatus = std.string(newValue)
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
var timestamp: Double {
|
|
48
|
+
@inline(__always)
|
|
49
|
+
get {
|
|
50
|
+
return self.__timestamp
|
|
51
|
+
}
|
|
52
|
+
@inline(__always)
|
|
53
|
+
set {
|
|
54
|
+
self.__timestamp = newValue
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
var isEssential: Bool {
|
|
59
|
+
@inline(__always)
|
|
60
|
+
get {
|
|
61
|
+
return self.__isEssential
|
|
62
|
+
}
|
|
63
|
+
@inline(__always)
|
|
64
|
+
set {
|
|
65
|
+
self.__isEssential = newValue
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|