securiti-consent-sdk 1.135.0-9rc → 1.136.0-10rc
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 +1 -1
- package/android/build.gradle +1 -1
- package/ios/HybridConsentSDK.swift +1 -0
- package/lib/index.d.ts +20 -0
- package/nitrogen/generated/android/NitroSecuritiConsentSdkOnLoad.cpp +1 -2
- package/nitrogen/generated/android/c++/JHybridConsentSDKSpec.cpp +7 -2
- package/nitrogen/generated/android/c++/JHybridConsentSDKSpec.hpp +2 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/securiticonsentsdk/AppPermission.kt +19 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/securiticonsentsdk/BannerConfig.kt +65 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/securiticonsentsdk/CmpSDKOptions.kt +23 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/securiticonsentsdk/CustomColors.kt +17 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/securiticonsentsdk/Func_void_bool.kt +1 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/securiticonsentsdk/PermissionConsent.kt +7 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/securiticonsentsdk/PostConsentsRequest.kt +25 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/securiticonsentsdk/Purpose.kt +25 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/securiticonsentsdk/PurposeConsent.kt +9 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/securiticonsentsdk/SDK.kt +19 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/securiticonsentsdk/SettingsPrompt.kt +11 -0
- package/nitrogen/generated/ios/NitroSecuritiConsentSdk-Swift-Cxx-Bridge.cpp +13 -13
- package/nitrogen/generated/ios/NitroSecuritiConsentSdk-Swift-Cxx-Bridge.hpp +148 -85
- package/nitrogen/generated/ios/NitroSecuritiConsentSdkAutolinking.mm +1 -1
- package/nitrogen/generated/ios/NitroSecuritiConsentSdkAutolinking.swift +2 -2
- package/nitrogen/generated/ios/c++/HybridConsentSDKSpecSwift.hpp +4 -2
- package/nitrogen/generated/ios/swift/AppPermission.swift +12 -6
- package/nitrogen/generated/ios/swift/BannerConfig.swift +47 -24
- package/nitrogen/generated/ios/swift/CmpSDKOptions.swift +8 -4
- package/nitrogen/generated/ios/swift/CustomColors.swift +16 -8
- package/nitrogen/generated/ios/swift/Func_void_bool.swift +6 -5
- package/nitrogen/generated/ios/swift/Func_void_std__exception_ptr.swift +1 -0
- package/nitrogen/generated/ios/swift/Func_void_std__optional_BannerConfig_.swift +3 -1
- package/nitrogen/generated/ios/swift/Func_void_std__optional_SettingsPrompt_.swift +3 -1
- package/nitrogen/generated/ios/swift/Func_void_std__string.swift +1 -0
- package/nitrogen/generated/ios/swift/Func_void_std__vector_AppPermission_.swift +1 -0
- package/nitrogen/generated/ios/swift/Func_void_std__vector_Purpose_.swift +1 -0
- package/nitrogen/generated/ios/swift/Func_void_std__vector_SDK_.swift +1 -0
- package/nitrogen/generated/ios/swift/HybridConsentSDKSpec.swift +2 -1
- package/nitrogen/generated/ios/swift/HybridConsentSDKSpec_cxx.swift +15 -6
- package/nitrogen/generated/ios/swift/PostConsentsRequest.swift +4 -2
- package/nitrogen/generated/ios/swift/Purpose.swift +14 -7
- package/nitrogen/generated/ios/swift/SDK.swift +14 -7
- package/nitrogen/generated/ios/swift/SettingsPrompt.swift +10 -5
- package/nitrogen/generated/shared/c++/AppPermission.hpp +4 -6
- package/nitrogen/generated/shared/c++/BannerConfig.hpp +7 -9
- package/nitrogen/generated/shared/c++/CmpSDKOptions.hpp +4 -6
- package/nitrogen/generated/shared/c++/CustomColors.hpp +5 -7
- package/nitrogen/generated/shared/c++/HybridConsentSDKSpec.hpp +3 -3
- package/nitrogen/generated/shared/c++/PermissionConsent.hpp +4 -6
- package/nitrogen/generated/shared/c++/PostConsentsRequest.hpp +11 -13
- package/nitrogen/generated/shared/c++/Purpose.hpp +8 -10
- package/nitrogen/generated/shared/c++/PurposeConsent.hpp +4 -6
- package/nitrogen/generated/shared/c++/SDK.hpp +4 -6
- package/nitrogen/generated/shared/c++/SettingsPrompt.hpp +5 -7
- package/package.json +1 -1
|
@@ -121,7 +121,8 @@ public extension Purpose {
|
|
|
121
121
|
@inline(__always)
|
|
122
122
|
get {
|
|
123
123
|
return { () -> String? in
|
|
124
|
-
if
|
|
124
|
+
if bridge.has_value_std__optional_std__string_(self.__purposeName) {
|
|
125
|
+
let __unwrapped = bridge.get_std__optional_std__string_(self.__purposeName)
|
|
125
126
|
return String(__unwrapped)
|
|
126
127
|
} else {
|
|
127
128
|
return nil
|
|
@@ -144,7 +145,8 @@ public extension Purpose {
|
|
|
144
145
|
@inline(__always)
|
|
145
146
|
get {
|
|
146
147
|
return { () -> String? in
|
|
147
|
-
if
|
|
148
|
+
if bridge.has_value_std__optional_std__string_(self.__purposeDescription) {
|
|
149
|
+
let __unwrapped = bridge.get_std__optional_std__string_(self.__purposeDescription)
|
|
148
150
|
return String(__unwrapped)
|
|
149
151
|
} else {
|
|
150
152
|
return nil
|
|
@@ -167,7 +169,8 @@ public extension Purpose {
|
|
|
167
169
|
@inline(__always)
|
|
168
170
|
get {
|
|
169
171
|
return { () -> [SDK]? in
|
|
170
|
-
if
|
|
172
|
+
if bridge.has_value_std__optional_std__vector_SDK__(self.__sdks) {
|
|
173
|
+
let __unwrapped = bridge.get_std__optional_std__vector_SDK__(self.__sdks)
|
|
171
174
|
return __unwrapped.map({ __item in __item })
|
|
172
175
|
} else {
|
|
173
176
|
return nil
|
|
@@ -196,7 +199,8 @@ public extension Purpose {
|
|
|
196
199
|
@inline(__always)
|
|
197
200
|
get {
|
|
198
201
|
return { () -> String? in
|
|
199
|
-
if
|
|
202
|
+
if bridge.has_value_std__optional_std__string_(self.__consentStatus) {
|
|
203
|
+
let __unwrapped = bridge.get_std__optional_std__string_(self.__consentStatus)
|
|
200
204
|
return String(__unwrapped)
|
|
201
205
|
} else {
|
|
202
206
|
return nil
|
|
@@ -236,7 +240,8 @@ public extension Purpose {
|
|
|
236
240
|
@inline(__always)
|
|
237
241
|
get {
|
|
238
242
|
return { () -> String? in
|
|
239
|
-
if
|
|
243
|
+
if bridge.has_value_std__optional_std__string_(self.__optOutText) {
|
|
244
|
+
let __unwrapped = bridge.get_std__optional_std__string_(self.__optOutText)
|
|
240
245
|
return String(__unwrapped)
|
|
241
246
|
} else {
|
|
242
247
|
return nil
|
|
@@ -293,7 +298,8 @@ public extension Purpose {
|
|
|
293
298
|
@inline(__always)
|
|
294
299
|
get {
|
|
295
300
|
return { () -> String? in
|
|
296
|
-
if
|
|
301
|
+
if bridge.has_value_std__optional_std__string_(self.__gadDescription) {
|
|
302
|
+
let __unwrapped = bridge.get_std__optional_std__string_(self.__gadDescription)
|
|
297
303
|
return String(__unwrapped)
|
|
298
304
|
} else {
|
|
299
305
|
return nil
|
|
@@ -333,7 +339,8 @@ public extension Purpose {
|
|
|
333
339
|
@inline(__always)
|
|
334
340
|
get {
|
|
335
341
|
return { () -> String? in
|
|
336
|
-
if
|
|
342
|
+
if bridge.has_value_std__optional_std__string_(self.__attDescription) {
|
|
343
|
+
let __unwrapped = bridge.get_std__optional_std__string_(self.__attDescription)
|
|
337
344
|
return String(__unwrapped)
|
|
338
345
|
} else {
|
|
339
346
|
return nil
|
|
@@ -103,7 +103,8 @@ public extension SDK {
|
|
|
103
103
|
@inline(__always)
|
|
104
104
|
get {
|
|
105
105
|
return { () -> String? in
|
|
106
|
-
if
|
|
106
|
+
if bridge.has_value_std__optional_std__string_(self.__namespaceId) {
|
|
107
|
+
let __unwrapped = bridge.get_std__optional_std__string_(self.__namespaceId)
|
|
107
108
|
return String(__unwrapped)
|
|
108
109
|
} else {
|
|
109
110
|
return nil
|
|
@@ -126,7 +127,8 @@ public extension SDK {
|
|
|
126
127
|
@inline(__always)
|
|
127
128
|
get {
|
|
128
129
|
return { () -> String? in
|
|
129
|
-
if
|
|
130
|
+
if bridge.has_value_std__optional_std__string_(self.__sdkName) {
|
|
131
|
+
let __unwrapped = bridge.get_std__optional_std__string_(self.__sdkName)
|
|
130
132
|
return String(__unwrapped)
|
|
131
133
|
} else {
|
|
132
134
|
return nil
|
|
@@ -149,7 +151,8 @@ public extension SDK {
|
|
|
149
151
|
@inline(__always)
|
|
150
152
|
get {
|
|
151
153
|
return { () -> String? in
|
|
152
|
-
if
|
|
154
|
+
if bridge.has_value_std__optional_std__string_(self.__sdkDescription) {
|
|
155
|
+
let __unwrapped = bridge.get_std__optional_std__string_(self.__sdkDescription)
|
|
153
156
|
return String(__unwrapped)
|
|
154
157
|
} else {
|
|
155
158
|
return nil
|
|
@@ -172,7 +175,8 @@ public extension SDK {
|
|
|
172
175
|
@inline(__always)
|
|
173
176
|
get {
|
|
174
177
|
return { () -> String? in
|
|
175
|
-
if
|
|
178
|
+
if bridge.has_value_std__optional_std__string_(self.__vendor) {
|
|
179
|
+
let __unwrapped = bridge.get_std__optional_std__string_(self.__vendor)
|
|
176
180
|
return String(__unwrapped)
|
|
177
181
|
} else {
|
|
178
182
|
return nil
|
|
@@ -195,7 +199,8 @@ public extension SDK {
|
|
|
195
199
|
@inline(__always)
|
|
196
200
|
get {
|
|
197
201
|
return { () -> String? in
|
|
198
|
-
if
|
|
202
|
+
if bridge.has_value_std__optional_std__string_(self.__logoBase64) {
|
|
203
|
+
let __unwrapped = bridge.get_std__optional_std__string_(self.__logoBase64)
|
|
199
204
|
return String(__unwrapped)
|
|
200
205
|
} else {
|
|
201
206
|
return nil
|
|
@@ -218,7 +223,8 @@ public extension SDK {
|
|
|
218
223
|
@inline(__always)
|
|
219
224
|
get {
|
|
220
225
|
return { () -> String? in
|
|
221
|
-
if
|
|
226
|
+
if bridge.has_value_std__optional_std__string_(self.__website) {
|
|
227
|
+
let __unwrapped = bridge.get_std__optional_std__string_(self.__website)
|
|
222
228
|
return String(__unwrapped)
|
|
223
229
|
} else {
|
|
224
230
|
return nil
|
|
@@ -241,7 +247,8 @@ public extension SDK {
|
|
|
241
247
|
@inline(__always)
|
|
242
248
|
get {
|
|
243
249
|
return { () -> [String]? in
|
|
244
|
-
if
|
|
250
|
+
if bridge.has_value_std__optional_std__vector_std__string__(self.__matchedBy) {
|
|
251
|
+
let __unwrapped = bridge.get_std__optional_std__vector_std__string__(self.__matchedBy)
|
|
245
252
|
return __unwrapped.map({ __item in String(__item) })
|
|
246
253
|
} else {
|
|
247
254
|
return nil
|
|
@@ -62,7 +62,8 @@ public extension SettingsPrompt {
|
|
|
62
62
|
@inline(__always)
|
|
63
63
|
get {
|
|
64
64
|
return { () -> String? in
|
|
65
|
-
if
|
|
65
|
+
if bridge.has_value_std__optional_std__string_(self.__promptHeading) {
|
|
66
|
+
let __unwrapped = bridge.get_std__optional_std__string_(self.__promptHeading)
|
|
66
67
|
return String(__unwrapped)
|
|
67
68
|
} else {
|
|
68
69
|
return nil
|
|
@@ -85,7 +86,8 @@ public extension SettingsPrompt {
|
|
|
85
86
|
@inline(__always)
|
|
86
87
|
get {
|
|
87
88
|
return { () -> String? in
|
|
88
|
-
if
|
|
89
|
+
if bridge.has_value_std__optional_std__string_(self.__promptMessage) {
|
|
90
|
+
let __unwrapped = bridge.get_std__optional_std__string_(self.__promptMessage)
|
|
89
91
|
return String(__unwrapped)
|
|
90
92
|
} else {
|
|
91
93
|
return nil
|
|
@@ -108,7 +110,8 @@ public extension SettingsPrompt {
|
|
|
108
110
|
@inline(__always)
|
|
109
111
|
get {
|
|
110
112
|
return { () -> String? in
|
|
111
|
-
if
|
|
113
|
+
if bridge.has_value_std__optional_std__string_(self.__settingsButtonText) {
|
|
114
|
+
let __unwrapped = bridge.get_std__optional_std__string_(self.__settingsButtonText)
|
|
112
115
|
return String(__unwrapped)
|
|
113
116
|
} else {
|
|
114
117
|
return nil
|
|
@@ -131,7 +134,8 @@ public extension SettingsPrompt {
|
|
|
131
134
|
@inline(__always)
|
|
132
135
|
get {
|
|
133
136
|
return { () -> String? in
|
|
134
|
-
if
|
|
137
|
+
if bridge.has_value_std__optional_std__string_(self.__notNowButtonText) {
|
|
138
|
+
let __unwrapped = bridge.get_std__optional_std__string_(self.__notNowButtonText)
|
|
135
139
|
return String(__unwrapped)
|
|
136
140
|
} else {
|
|
137
141
|
return nil
|
|
@@ -154,7 +158,8 @@ public extension SettingsPrompt {
|
|
|
154
158
|
@inline(__always)
|
|
155
159
|
get {
|
|
156
160
|
return { () -> [String]? in
|
|
157
|
-
if
|
|
161
|
+
if bridge.has_value_std__optional_std__vector_std__string__(self.__permissions) {
|
|
162
|
+
let __unwrapped = bridge.get_std__optional_std__vector_std__string__(self.__permissions)
|
|
158
163
|
return __unwrapped.map({ __item in String(__item) })
|
|
159
164
|
} else {
|
|
160
165
|
return nil
|
|
@@ -49,14 +49,12 @@ namespace margelo::nitro::securiticonsentsdk {
|
|
|
49
49
|
|
|
50
50
|
namespace margelo::nitro {
|
|
51
51
|
|
|
52
|
-
using namespace margelo::nitro::securiticonsentsdk;
|
|
53
|
-
|
|
54
52
|
// C++ AppPermission <> JS AppPermission (object)
|
|
55
53
|
template <>
|
|
56
|
-
struct JSIConverter<AppPermission> final {
|
|
57
|
-
static inline AppPermission fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
54
|
+
struct JSIConverter<margelo::nitro::securiticonsentsdk::AppPermission> final {
|
|
55
|
+
static inline margelo::nitro::securiticonsentsdk::AppPermission fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
58
56
|
jsi::Object obj = arg.asObject(runtime);
|
|
59
|
-
return AppPermission(
|
|
57
|
+
return margelo::nitro::securiticonsentsdk::AppPermission(
|
|
60
58
|
JSIConverter<std::optional<double>>::fromJSI(runtime, obj.getProperty(runtime, "id")),
|
|
61
59
|
JSIConverter<std::optional<std::string>>::fromJSI(runtime, obj.getProperty(runtime, "name")),
|
|
62
60
|
JSIConverter<std::optional<std::string>>::fromJSI(runtime, obj.getProperty(runtime, "permissionId")),
|
|
@@ -68,7 +66,7 @@ namespace margelo::nitro {
|
|
|
68
66
|
JSIConverter<std::optional<bool>>::fromJSI(runtime, obj.getProperty(runtime, "isSettingsPromptEnabled"))
|
|
69
67
|
);
|
|
70
68
|
}
|
|
71
|
-
static inline jsi::Value toJSI(jsi::Runtime& runtime, const AppPermission& arg) {
|
|
69
|
+
static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::securiticonsentsdk::AppPermission& arg) {
|
|
72
70
|
jsi::Object obj(runtime);
|
|
73
71
|
obj.setProperty(runtime, "id", JSIConverter<std::optional<double>>::toJSI(runtime, arg.id));
|
|
74
72
|
obj.setProperty(runtime, "name", JSIConverter<std::optional<std::string>>::toJSI(runtime, arg.name));
|
|
@@ -75,14 +75,12 @@ namespace margelo::nitro::securiticonsentsdk {
|
|
|
75
75
|
|
|
76
76
|
namespace margelo::nitro {
|
|
77
77
|
|
|
78
|
-
using namespace margelo::nitro::securiticonsentsdk;
|
|
79
|
-
|
|
80
78
|
// C++ BannerConfig <> JS BannerConfig (object)
|
|
81
79
|
template <>
|
|
82
|
-
struct JSIConverter<BannerConfig> final {
|
|
83
|
-
static inline BannerConfig fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
80
|
+
struct JSIConverter<margelo::nitro::securiticonsentsdk::BannerConfig> final {
|
|
81
|
+
static inline margelo::nitro::securiticonsentsdk::BannerConfig fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
84
82
|
jsi::Object obj = arg.asObject(runtime);
|
|
85
|
-
return BannerConfig(
|
|
83
|
+
return margelo::nitro::securiticonsentsdk::BannerConfig(
|
|
86
84
|
JSIConverter<std::optional<bool>>::fromJSI(runtime, obj.getProperty(runtime, "hideCloseButton")),
|
|
87
85
|
JSIConverter<std::optional<bool>>::fromJSI(runtime, obj.getProperty(runtime, "hideAcceptButton")),
|
|
88
86
|
JSIConverter<std::optional<bool>>::fromJSI(runtime, obj.getProperty(runtime, "embedDSRPortalLink")),
|
|
@@ -112,12 +110,12 @@ namespace margelo::nitro {
|
|
|
112
110
|
JSIConverter<std::optional<std::string>>::fromJSI(runtime, obj.getProperty(runtime, "bannerPosition")),
|
|
113
111
|
JSIConverter<std::optional<std::string>>::fromJSI(runtime, obj.getProperty(runtime, "buttonShape")),
|
|
114
112
|
JSIConverter<std::optional<std::string>>::fromJSI(runtime, obj.getProperty(runtime, "companyLogo")),
|
|
115
|
-
JSIConverter<std::optional<CustomColors>>::fromJSI(runtime, obj.getProperty(runtime, "customPaletteTheme")),
|
|
113
|
+
JSIConverter<std::optional<margelo::nitro::securiticonsentsdk::CustomColors>>::fromJSI(runtime, obj.getProperty(runtime, "customPaletteTheme")),
|
|
116
114
|
JSIConverter<std::optional<bool>>::fromJSI(runtime, obj.getProperty(runtime, "shouldShowSettingsPrompt")),
|
|
117
115
|
JSIConverter<std::optional<std::unordered_map<std::string, std::string>>>::fromJSI(runtime, obj.getProperty(runtime, "translations"))
|
|
118
116
|
);
|
|
119
117
|
}
|
|
120
|
-
static inline jsi::Value toJSI(jsi::Runtime& runtime, const BannerConfig& arg) {
|
|
118
|
+
static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::securiticonsentsdk::BannerConfig& arg) {
|
|
121
119
|
jsi::Object obj(runtime);
|
|
122
120
|
obj.setProperty(runtime, "hideCloseButton", JSIConverter<std::optional<bool>>::toJSI(runtime, arg.hideCloseButton));
|
|
123
121
|
obj.setProperty(runtime, "hideAcceptButton", JSIConverter<std::optional<bool>>::toJSI(runtime, arg.hideAcceptButton));
|
|
@@ -148,7 +146,7 @@ namespace margelo::nitro {
|
|
|
148
146
|
obj.setProperty(runtime, "bannerPosition", JSIConverter<std::optional<std::string>>::toJSI(runtime, arg.bannerPosition));
|
|
149
147
|
obj.setProperty(runtime, "buttonShape", JSIConverter<std::optional<std::string>>::toJSI(runtime, arg.buttonShape));
|
|
150
148
|
obj.setProperty(runtime, "companyLogo", JSIConverter<std::optional<std::string>>::toJSI(runtime, arg.companyLogo));
|
|
151
|
-
obj.setProperty(runtime, "customPaletteTheme", JSIConverter<std::optional<CustomColors>>::toJSI(runtime, arg.customPaletteTheme));
|
|
149
|
+
obj.setProperty(runtime, "customPaletteTheme", JSIConverter<std::optional<margelo::nitro::securiticonsentsdk::CustomColors>>::toJSI(runtime, arg.customPaletteTheme));
|
|
152
150
|
obj.setProperty(runtime, "shouldShowSettingsPrompt", JSIConverter<std::optional<bool>>::toJSI(runtime, arg.shouldShowSettingsPrompt));
|
|
153
151
|
obj.setProperty(runtime, "translations", JSIConverter<std::optional<std::unordered_map<std::string, std::string>>>::toJSI(runtime, arg.translations));
|
|
154
152
|
return obj;
|
|
@@ -187,7 +185,7 @@ namespace margelo::nitro {
|
|
|
187
185
|
if (!JSIConverter<std::optional<std::string>>::canConvert(runtime, obj.getProperty(runtime, "bannerPosition"))) return false;
|
|
188
186
|
if (!JSIConverter<std::optional<std::string>>::canConvert(runtime, obj.getProperty(runtime, "buttonShape"))) return false;
|
|
189
187
|
if (!JSIConverter<std::optional<std::string>>::canConvert(runtime, obj.getProperty(runtime, "companyLogo"))) return false;
|
|
190
|
-
if (!JSIConverter<std::optional<CustomColors>>::canConvert(runtime, obj.getProperty(runtime, "customPaletteTheme"))) return false;
|
|
188
|
+
if (!JSIConverter<std::optional<margelo::nitro::securiticonsentsdk::CustomColors>>::canConvert(runtime, obj.getProperty(runtime, "customPaletteTheme"))) return false;
|
|
191
189
|
if (!JSIConverter<std::optional<bool>>::canConvert(runtime, obj.getProperty(runtime, "shouldShowSettingsPrompt"))) return false;
|
|
192
190
|
if (!JSIConverter<std::optional<std::unordered_map<std::string, std::string>>>::canConvert(runtime, obj.getProperty(runtime, "translations"))) return false;
|
|
193
191
|
return true;
|
|
@@ -51,14 +51,12 @@ namespace margelo::nitro::securiticonsentsdk {
|
|
|
51
51
|
|
|
52
52
|
namespace margelo::nitro {
|
|
53
53
|
|
|
54
|
-
using namespace margelo::nitro::securiticonsentsdk;
|
|
55
|
-
|
|
56
54
|
// C++ CmpSDKOptions <> JS CmpSDKOptions (object)
|
|
57
55
|
template <>
|
|
58
|
-
struct JSIConverter<CmpSDKOptions> final {
|
|
59
|
-
static inline CmpSDKOptions fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
56
|
+
struct JSIConverter<margelo::nitro::securiticonsentsdk::CmpSDKOptions> final {
|
|
57
|
+
static inline margelo::nitro::securiticonsentsdk::CmpSDKOptions fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
60
58
|
jsi::Object obj = arg.asObject(runtime);
|
|
61
|
-
return CmpSDKOptions(
|
|
59
|
+
return margelo::nitro::securiticonsentsdk::CmpSDKOptions(
|
|
62
60
|
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "appURL")),
|
|
63
61
|
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "cdnURL")),
|
|
64
62
|
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "tenantID")),
|
|
@@ -72,7 +70,7 @@ namespace margelo::nitro {
|
|
|
72
70
|
JSIConverter<std::optional<std::string>>::fromJSI(runtime, obj.getProperty(runtime, "mode"))
|
|
73
71
|
);
|
|
74
72
|
}
|
|
75
|
-
static inline jsi::Value toJSI(jsi::Runtime& runtime, const CmpSDKOptions& arg) {
|
|
73
|
+
static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::securiticonsentsdk::CmpSDKOptions& arg) {
|
|
76
74
|
jsi::Object obj(runtime);
|
|
77
75
|
obj.setProperty(runtime, "appURL", JSIConverter<std::string>::toJSI(runtime, arg.appURL));
|
|
78
76
|
obj.setProperty(runtime, "cdnURL", JSIConverter<std::string>::toJSI(runtime, arg.cdnURL));
|
|
@@ -20,8 +20,8 @@
|
|
|
20
20
|
|
|
21
21
|
|
|
22
22
|
|
|
23
|
-
#include <optional>
|
|
24
23
|
#include <string>
|
|
24
|
+
#include <optional>
|
|
25
25
|
|
|
26
26
|
namespace margelo::nitro::securiticonsentsdk {
|
|
27
27
|
|
|
@@ -48,14 +48,12 @@ namespace margelo::nitro::securiticonsentsdk {
|
|
|
48
48
|
|
|
49
49
|
namespace margelo::nitro {
|
|
50
50
|
|
|
51
|
-
using namespace margelo::nitro::securiticonsentsdk;
|
|
52
|
-
|
|
53
51
|
// C++ CustomColors <> JS CustomColors (object)
|
|
54
52
|
template <>
|
|
55
|
-
struct JSIConverter<CustomColors> final {
|
|
56
|
-
static inline CustomColors fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
53
|
+
struct JSIConverter<margelo::nitro::securiticonsentsdk::CustomColors> final {
|
|
54
|
+
static inline margelo::nitro::securiticonsentsdk::CustomColors fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
57
55
|
jsi::Object obj = arg.asObject(runtime);
|
|
58
|
-
return CustomColors(
|
|
56
|
+
return margelo::nitro::securiticonsentsdk::CustomColors(
|
|
59
57
|
JSIConverter<std::optional<std::string>>::fromJSI(runtime, obj.getProperty(runtime, "buttonBackground")),
|
|
60
58
|
JSIConverter<std::optional<std::string>>::fromJSI(runtime, obj.getProperty(runtime, "buttonText")),
|
|
61
59
|
JSIConverter<std::optional<std::string>>::fromJSI(runtime, obj.getProperty(runtime, "buttonBorder")),
|
|
@@ -66,7 +64,7 @@ namespace margelo::nitro {
|
|
|
66
64
|
JSIConverter<std::optional<std::string>>::fromJSI(runtime, obj.getProperty(runtime, "preferenceCenterFooterSelector"))
|
|
67
65
|
);
|
|
68
66
|
}
|
|
69
|
-
static inline jsi::Value toJSI(jsi::Runtime& runtime, const CustomColors& arg) {
|
|
67
|
+
static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::securiticonsentsdk::CustomColors& arg) {
|
|
70
68
|
jsi::Object obj(runtime);
|
|
71
69
|
obj.setProperty(runtime, "buttonBackground", JSIConverter<std::optional<std::string>>::toJSI(runtime, arg.buttonBackground));
|
|
72
70
|
obj.setProperty(runtime, "buttonText", JSIConverter<std::optional<std::string>>::toJSI(runtime, arg.buttonText));
|
|
@@ -30,14 +30,14 @@ namespace margelo::nitro::securiticonsentsdk { struct PostConsentsRequest; }
|
|
|
30
30
|
|
|
31
31
|
#include "CmpSDKOptions.hpp"
|
|
32
32
|
#include <functional>
|
|
33
|
-
#include <NitroModules/Promise.hpp>
|
|
34
33
|
#include <string>
|
|
35
|
-
#include <
|
|
34
|
+
#include <NitroModules/Promise.hpp>
|
|
36
35
|
#include "AppPermission.hpp"
|
|
36
|
+
#include <vector>
|
|
37
37
|
#include "Purpose.hpp"
|
|
38
38
|
#include "SDK.hpp"
|
|
39
|
-
#include <optional>
|
|
40
39
|
#include "BannerConfig.hpp"
|
|
40
|
+
#include <optional>
|
|
41
41
|
#include "SettingsPrompt.hpp"
|
|
42
42
|
#include "PostConsentsRequest.hpp"
|
|
43
43
|
|
|
@@ -42,20 +42,18 @@ namespace margelo::nitro::securiticonsentsdk {
|
|
|
42
42
|
|
|
43
43
|
namespace margelo::nitro {
|
|
44
44
|
|
|
45
|
-
using namespace margelo::nitro::securiticonsentsdk;
|
|
46
|
-
|
|
47
45
|
// C++ PermissionConsent <> JS PermissionConsent (object)
|
|
48
46
|
template <>
|
|
49
|
-
struct JSIConverter<PermissionConsent> final {
|
|
50
|
-
static inline PermissionConsent fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
47
|
+
struct JSIConverter<margelo::nitro::securiticonsentsdk::PermissionConsent> final {
|
|
48
|
+
static inline margelo::nitro::securiticonsentsdk::PermissionConsent fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
51
49
|
jsi::Object obj = arg.asObject(runtime);
|
|
52
|
-
return PermissionConsent(
|
|
50
|
+
return margelo::nitro::securiticonsentsdk::PermissionConsent(
|
|
53
51
|
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "permission")),
|
|
54
52
|
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "consentStatus")),
|
|
55
53
|
JSIConverter<double>::fromJSI(runtime, obj.getProperty(runtime, "timestamp"))
|
|
56
54
|
);
|
|
57
55
|
}
|
|
58
|
-
static inline jsi::Value toJSI(jsi::Runtime& runtime, const PermissionConsent& arg) {
|
|
56
|
+
static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::securiticonsentsdk::PermissionConsent& arg) {
|
|
59
57
|
jsi::Object obj(runtime);
|
|
60
58
|
obj.setProperty(runtime, "permission", JSIConverter<std::string>::toJSI(runtime, arg.permission));
|
|
61
59
|
obj.setProperty(runtime, "consentStatus", JSIConverter<std::string>::toJSI(runtime, arg.consentStatus));
|
|
@@ -24,8 +24,8 @@ namespace margelo::nitro::securiticonsentsdk { struct PurposeConsent; }
|
|
|
24
24
|
namespace margelo::nitro::securiticonsentsdk { struct PermissionConsent; }
|
|
25
25
|
|
|
26
26
|
#include <string>
|
|
27
|
-
#include <vector>
|
|
28
27
|
#include "PurposeConsent.hpp"
|
|
28
|
+
#include <vector>
|
|
29
29
|
#include "PermissionConsent.hpp"
|
|
30
30
|
#include <optional>
|
|
31
31
|
|
|
@@ -58,21 +58,19 @@ namespace margelo::nitro::securiticonsentsdk {
|
|
|
58
58
|
|
|
59
59
|
namespace margelo::nitro {
|
|
60
60
|
|
|
61
|
-
using namespace margelo::nitro::securiticonsentsdk;
|
|
62
|
-
|
|
63
61
|
// C++ PostConsentsRequest <> JS PostConsentsRequest (object)
|
|
64
62
|
template <>
|
|
65
|
-
struct JSIConverter<PostConsentsRequest> final {
|
|
66
|
-
static inline PostConsentsRequest fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
63
|
+
struct JSIConverter<margelo::nitro::securiticonsentsdk::PostConsentsRequest> final {
|
|
64
|
+
static inline margelo::nitro::securiticonsentsdk::PostConsentsRequest fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
67
65
|
jsi::Object obj = arg.asObject(runtime);
|
|
68
|
-
return PostConsentsRequest(
|
|
66
|
+
return margelo::nitro::securiticonsentsdk::PostConsentsRequest(
|
|
69
67
|
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "uuid")),
|
|
70
68
|
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "appUUID")),
|
|
71
69
|
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "device")),
|
|
72
70
|
JSIConverter<bool>::fromJSI(runtime, obj.getProperty(runtime, "implicitConsent")),
|
|
73
71
|
JSIConverter<double>::fromJSI(runtime, obj.getProperty(runtime, "version")),
|
|
74
|
-
JSIConverter<std::vector<PurposeConsent>>::fromJSI(runtime, obj.getProperty(runtime, "purposeConsents")),
|
|
75
|
-
JSIConverter<std::vector<PermissionConsent>>::fromJSI(runtime, obj.getProperty(runtime, "permissions")),
|
|
72
|
+
JSIConverter<std::vector<margelo::nitro::securiticonsentsdk::PurposeConsent>>::fromJSI(runtime, obj.getProperty(runtime, "purposeConsents")),
|
|
73
|
+
JSIConverter<std::vector<margelo::nitro::securiticonsentsdk::PermissionConsent>>::fromJSI(runtime, obj.getProperty(runtime, "permissions")),
|
|
76
74
|
JSIConverter<bool>::fromJSI(runtime, obj.getProperty(runtime, "isTestMode")),
|
|
77
75
|
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "adId")),
|
|
78
76
|
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "bannerInfo")),
|
|
@@ -80,15 +78,15 @@ namespace margelo::nitro {
|
|
|
80
78
|
JSIConverter<std::optional<std::string>>::fromJSI(runtime, obj.getProperty(runtime, "platform"))
|
|
81
79
|
);
|
|
82
80
|
}
|
|
83
|
-
static inline jsi::Value toJSI(jsi::Runtime& runtime, const PostConsentsRequest& arg) {
|
|
81
|
+
static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::securiticonsentsdk::PostConsentsRequest& arg) {
|
|
84
82
|
jsi::Object obj(runtime);
|
|
85
83
|
obj.setProperty(runtime, "uuid", JSIConverter<std::string>::toJSI(runtime, arg.uuid));
|
|
86
84
|
obj.setProperty(runtime, "appUUID", JSIConverter<std::string>::toJSI(runtime, arg.appUUID));
|
|
87
85
|
obj.setProperty(runtime, "device", JSIConverter<std::string>::toJSI(runtime, arg.device));
|
|
88
86
|
obj.setProperty(runtime, "implicitConsent", JSIConverter<bool>::toJSI(runtime, arg.implicitConsent));
|
|
89
87
|
obj.setProperty(runtime, "version", JSIConverter<double>::toJSI(runtime, arg.version));
|
|
90
|
-
obj.setProperty(runtime, "purposeConsents", JSIConverter<std::vector<PurposeConsent>>::toJSI(runtime, arg.purposeConsents));
|
|
91
|
-
obj.setProperty(runtime, "permissions", JSIConverter<std::vector<PermissionConsent>>::toJSI(runtime, arg.permissions));
|
|
88
|
+
obj.setProperty(runtime, "purposeConsents", JSIConverter<std::vector<margelo::nitro::securiticonsentsdk::PurposeConsent>>::toJSI(runtime, arg.purposeConsents));
|
|
89
|
+
obj.setProperty(runtime, "permissions", JSIConverter<std::vector<margelo::nitro::securiticonsentsdk::PermissionConsent>>::toJSI(runtime, arg.permissions));
|
|
92
90
|
obj.setProperty(runtime, "isTestMode", JSIConverter<bool>::toJSI(runtime, arg.isTestMode));
|
|
93
91
|
obj.setProperty(runtime, "adId", JSIConverter<std::string>::toJSI(runtime, arg.adId));
|
|
94
92
|
obj.setProperty(runtime, "bannerInfo", JSIConverter<std::string>::toJSI(runtime, arg.bannerInfo));
|
|
@@ -106,8 +104,8 @@ namespace margelo::nitro {
|
|
|
106
104
|
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "device"))) return false;
|
|
107
105
|
if (!JSIConverter<bool>::canConvert(runtime, obj.getProperty(runtime, "implicitConsent"))) return false;
|
|
108
106
|
if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, "version"))) return false;
|
|
109
|
-
if (!JSIConverter<std::vector<PurposeConsent>>::canConvert(runtime, obj.getProperty(runtime, "purposeConsents"))) return false;
|
|
110
|
-
if (!JSIConverter<std::vector<PermissionConsent>>::canConvert(runtime, obj.getProperty(runtime, "permissions"))) return false;
|
|
107
|
+
if (!JSIConverter<std::vector<margelo::nitro::securiticonsentsdk::PurposeConsent>>::canConvert(runtime, obj.getProperty(runtime, "purposeConsents"))) return false;
|
|
108
|
+
if (!JSIConverter<std::vector<margelo::nitro::securiticonsentsdk::PermissionConsent>>::canConvert(runtime, obj.getProperty(runtime, "permissions"))) return false;
|
|
111
109
|
if (!JSIConverter<bool>::canConvert(runtime, obj.getProperty(runtime, "isTestMode"))) return false;
|
|
112
110
|
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "adId"))) return false;
|
|
113
111
|
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "bannerInfo"))) return false;
|
|
@@ -23,8 +23,8 @@ namespace margelo::nitro::securiticonsentsdk { struct SDK; }
|
|
|
23
23
|
|
|
24
24
|
#include <optional>
|
|
25
25
|
#include <string>
|
|
26
|
-
#include <vector>
|
|
27
26
|
#include "SDK.hpp"
|
|
27
|
+
#include <vector>
|
|
28
28
|
|
|
29
29
|
namespace margelo::nitro::securiticonsentsdk {
|
|
30
30
|
|
|
@@ -55,18 +55,16 @@ namespace margelo::nitro::securiticonsentsdk {
|
|
|
55
55
|
|
|
56
56
|
namespace margelo::nitro {
|
|
57
57
|
|
|
58
|
-
using namespace margelo::nitro::securiticonsentsdk;
|
|
59
|
-
|
|
60
58
|
// C++ Purpose <> JS Purpose (object)
|
|
61
59
|
template <>
|
|
62
|
-
struct JSIConverter<Purpose> final {
|
|
63
|
-
static inline Purpose fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
60
|
+
struct JSIConverter<margelo::nitro::securiticonsentsdk::Purpose> final {
|
|
61
|
+
static inline margelo::nitro::securiticonsentsdk::Purpose fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
64
62
|
jsi::Object obj = arg.asObject(runtime);
|
|
65
|
-
return Purpose(
|
|
63
|
+
return margelo::nitro::securiticonsentsdk::Purpose(
|
|
66
64
|
JSIConverter<std::optional<double>>::fromJSI(runtime, obj.getProperty(runtime, "purposeId")),
|
|
67
65
|
JSIConverter<std::optional<std::string>>::fromJSI(runtime, obj.getProperty(runtime, "purposeName")),
|
|
68
66
|
JSIConverter<std::optional<std::string>>::fromJSI(runtime, obj.getProperty(runtime, "purposeDescription")),
|
|
69
|
-
JSIConverter<std::optional<std::vector<SDK>>>::fromJSI(runtime, obj.getProperty(runtime, "sdks")),
|
|
67
|
+
JSIConverter<std::optional<std::vector<margelo::nitro::securiticonsentsdk::SDK>>>::fromJSI(runtime, obj.getProperty(runtime, "sdks")),
|
|
70
68
|
JSIConverter<std::optional<std::string>>::fromJSI(runtime, obj.getProperty(runtime, "consentStatus")),
|
|
71
69
|
JSIConverter<std::optional<bool>>::fromJSI(runtime, obj.getProperty(runtime, "disableOptOut")),
|
|
72
70
|
JSIConverter<std::optional<std::string>>::fromJSI(runtime, obj.getProperty(runtime, "optOutText")),
|
|
@@ -77,12 +75,12 @@ namespace margelo::nitro {
|
|
|
77
75
|
JSIConverter<std::optional<std::string>>::fromJSI(runtime, obj.getProperty(runtime, "attDescription"))
|
|
78
76
|
);
|
|
79
77
|
}
|
|
80
|
-
static inline jsi::Value toJSI(jsi::Runtime& runtime, const Purpose& arg) {
|
|
78
|
+
static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::securiticonsentsdk::Purpose& arg) {
|
|
81
79
|
jsi::Object obj(runtime);
|
|
82
80
|
obj.setProperty(runtime, "purposeId", JSIConverter<std::optional<double>>::toJSI(runtime, arg.purposeId));
|
|
83
81
|
obj.setProperty(runtime, "purposeName", JSIConverter<std::optional<std::string>>::toJSI(runtime, arg.purposeName));
|
|
84
82
|
obj.setProperty(runtime, "purposeDescription", JSIConverter<std::optional<std::string>>::toJSI(runtime, arg.purposeDescription));
|
|
85
|
-
obj.setProperty(runtime, "sdks", JSIConverter<std::optional<std::vector<SDK>>>::toJSI(runtime, arg.sdks));
|
|
83
|
+
obj.setProperty(runtime, "sdks", JSIConverter<std::optional<std::vector<margelo::nitro::securiticonsentsdk::SDK>>>::toJSI(runtime, arg.sdks));
|
|
86
84
|
obj.setProperty(runtime, "consentStatus", JSIConverter<std::optional<std::string>>::toJSI(runtime, arg.consentStatus));
|
|
87
85
|
obj.setProperty(runtime, "disableOptOut", JSIConverter<std::optional<bool>>::toJSI(runtime, arg.disableOptOut));
|
|
88
86
|
obj.setProperty(runtime, "optOutText", JSIConverter<std::optional<std::string>>::toJSI(runtime, arg.optOutText));
|
|
@@ -101,7 +99,7 @@ namespace margelo::nitro {
|
|
|
101
99
|
if (!JSIConverter<std::optional<double>>::canConvert(runtime, obj.getProperty(runtime, "purposeId"))) return false;
|
|
102
100
|
if (!JSIConverter<std::optional<std::string>>::canConvert(runtime, obj.getProperty(runtime, "purposeName"))) return false;
|
|
103
101
|
if (!JSIConverter<std::optional<std::string>>::canConvert(runtime, obj.getProperty(runtime, "purposeDescription"))) return false;
|
|
104
|
-
if (!JSIConverter<std::optional<std::vector<SDK>>>::canConvert(runtime, obj.getProperty(runtime, "sdks"))) return false;
|
|
102
|
+
if (!JSIConverter<std::optional<std::vector<margelo::nitro::securiticonsentsdk::SDK>>>::canConvert(runtime, obj.getProperty(runtime, "sdks"))) return false;
|
|
105
103
|
if (!JSIConverter<std::optional<std::string>>::canConvert(runtime, obj.getProperty(runtime, "consentStatus"))) return false;
|
|
106
104
|
if (!JSIConverter<std::optional<bool>>::canConvert(runtime, obj.getProperty(runtime, "disableOptOut"))) return false;
|
|
107
105
|
if (!JSIConverter<std::optional<std::string>>::canConvert(runtime, obj.getProperty(runtime, "optOutText"))) return false;
|
|
@@ -43,21 +43,19 @@ namespace margelo::nitro::securiticonsentsdk {
|
|
|
43
43
|
|
|
44
44
|
namespace margelo::nitro {
|
|
45
45
|
|
|
46
|
-
using namespace margelo::nitro::securiticonsentsdk;
|
|
47
|
-
|
|
48
46
|
// C++ PurposeConsent <> JS PurposeConsent (object)
|
|
49
47
|
template <>
|
|
50
|
-
struct JSIConverter<PurposeConsent> final {
|
|
51
|
-
static inline PurposeConsent fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
48
|
+
struct JSIConverter<margelo::nitro::securiticonsentsdk::PurposeConsent> final {
|
|
49
|
+
static inline margelo::nitro::securiticonsentsdk::PurposeConsent fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
52
50
|
jsi::Object obj = arg.asObject(runtime);
|
|
53
|
-
return PurposeConsent(
|
|
51
|
+
return margelo::nitro::securiticonsentsdk::PurposeConsent(
|
|
54
52
|
JSIConverter<double>::fromJSI(runtime, obj.getProperty(runtime, "purposeID")),
|
|
55
53
|
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "consentStatus")),
|
|
56
54
|
JSIConverter<double>::fromJSI(runtime, obj.getProperty(runtime, "timestamp")),
|
|
57
55
|
JSIConverter<bool>::fromJSI(runtime, obj.getProperty(runtime, "isEssential"))
|
|
58
56
|
);
|
|
59
57
|
}
|
|
60
|
-
static inline jsi::Value toJSI(jsi::Runtime& runtime, const PurposeConsent& arg) {
|
|
58
|
+
static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::securiticonsentsdk::PurposeConsent& arg) {
|
|
61
59
|
jsi::Object obj(runtime);
|
|
62
60
|
obj.setProperty(runtime, "purposeID", JSIConverter<double>::toJSI(runtime, arg.purposeID));
|
|
63
61
|
obj.setProperty(runtime, "consentStatus", JSIConverter<std::string>::toJSI(runtime, arg.consentStatus));
|
|
@@ -50,14 +50,12 @@ namespace margelo::nitro::securiticonsentsdk {
|
|
|
50
50
|
|
|
51
51
|
namespace margelo::nitro {
|
|
52
52
|
|
|
53
|
-
using namespace margelo::nitro::securiticonsentsdk;
|
|
54
|
-
|
|
55
53
|
// C++ SDK <> JS SDK (object)
|
|
56
54
|
template <>
|
|
57
|
-
struct JSIConverter<SDK> final {
|
|
58
|
-
static inline SDK fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
55
|
+
struct JSIConverter<margelo::nitro::securiticonsentsdk::SDK> final {
|
|
56
|
+
static inline margelo::nitro::securiticonsentsdk::SDK fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
59
57
|
jsi::Object obj = arg.asObject(runtime);
|
|
60
|
-
return SDK(
|
|
58
|
+
return margelo::nitro::securiticonsentsdk::SDK(
|
|
61
59
|
JSIConverter<std::optional<double>>::fromJSI(runtime, obj.getProperty(runtime, "sdkId")),
|
|
62
60
|
JSIConverter<std::optional<std::string>>::fromJSI(runtime, obj.getProperty(runtime, "namespaceId")),
|
|
63
61
|
JSIConverter<std::optional<std::string>>::fromJSI(runtime, obj.getProperty(runtime, "sdkName")),
|
|
@@ -69,7 +67,7 @@ namespace margelo::nitro {
|
|
|
69
67
|
JSIConverter<std::optional<bool>>::fromJSI(runtime, obj.getProperty(runtime, "collectingData"))
|
|
70
68
|
);
|
|
71
69
|
}
|
|
72
|
-
static inline jsi::Value toJSI(jsi::Runtime& runtime, const SDK& arg) {
|
|
70
|
+
static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::securiticonsentsdk::SDK& arg) {
|
|
73
71
|
jsi::Object obj(runtime);
|
|
74
72
|
obj.setProperty(runtime, "sdkId", JSIConverter<std::optional<double>>::toJSI(runtime, arg.sdkId));
|
|
75
73
|
obj.setProperty(runtime, "namespaceId", JSIConverter<std::optional<std::string>>::toJSI(runtime, arg.namespaceId));
|
|
@@ -20,8 +20,8 @@
|
|
|
20
20
|
|
|
21
21
|
|
|
22
22
|
|
|
23
|
-
#include <optional>
|
|
24
23
|
#include <string>
|
|
24
|
+
#include <optional>
|
|
25
25
|
#include <vector>
|
|
26
26
|
|
|
27
27
|
namespace margelo::nitro::securiticonsentsdk {
|
|
@@ -46,14 +46,12 @@ namespace margelo::nitro::securiticonsentsdk {
|
|
|
46
46
|
|
|
47
47
|
namespace margelo::nitro {
|
|
48
48
|
|
|
49
|
-
using namespace margelo::nitro::securiticonsentsdk;
|
|
50
|
-
|
|
51
49
|
// C++ SettingsPrompt <> JS SettingsPrompt (object)
|
|
52
50
|
template <>
|
|
53
|
-
struct JSIConverter<SettingsPrompt> final {
|
|
54
|
-
static inline SettingsPrompt fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
51
|
+
struct JSIConverter<margelo::nitro::securiticonsentsdk::SettingsPrompt> final {
|
|
52
|
+
static inline margelo::nitro::securiticonsentsdk::SettingsPrompt fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
55
53
|
jsi::Object obj = arg.asObject(runtime);
|
|
56
|
-
return SettingsPrompt(
|
|
54
|
+
return margelo::nitro::securiticonsentsdk::SettingsPrompt(
|
|
57
55
|
JSIConverter<std::optional<std::string>>::fromJSI(runtime, obj.getProperty(runtime, "promptHeading")),
|
|
58
56
|
JSIConverter<std::optional<std::string>>::fromJSI(runtime, obj.getProperty(runtime, "promptMessage")),
|
|
59
57
|
JSIConverter<std::optional<std::string>>::fromJSI(runtime, obj.getProperty(runtime, "settingsButtonText")),
|
|
@@ -61,7 +59,7 @@ namespace margelo::nitro {
|
|
|
61
59
|
JSIConverter<std::optional<std::vector<std::string>>>::fromJSI(runtime, obj.getProperty(runtime, "permissions"))
|
|
62
60
|
);
|
|
63
61
|
}
|
|
64
|
-
static inline jsi::Value toJSI(jsi::Runtime& runtime, const SettingsPrompt& arg) {
|
|
62
|
+
static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::securiticonsentsdk::SettingsPrompt& arg) {
|
|
65
63
|
jsi::Object obj(runtime);
|
|
66
64
|
obj.setProperty(runtime, "promptHeading", JSIConverter<std::optional<std::string>>::toJSI(runtime, arg.promptHeading));
|
|
67
65
|
obj.setProperty(runtime, "promptMessage", JSIConverter<std::optional<std::string>>::toJSI(runtime, arg.promptMessage));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "securiti-consent-sdk",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.136.0-10rc",
|
|
4
4
|
"description": "A React Native Library for managing user consent preferences and compliance with privacy regulations. Integrates with Securiti's Consent Management Platform.",
|
|
5
5
|
"main": "lib/index",
|
|
6
6
|
"module": "lib/index",
|