securiti-consent-sdk 1.136.0-5rc → 1.136.0-7rc
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/nitrogen/generated/ios/NitroSecuritiConsentSdk-Swift-Cxx-Bridge.cpp +3 -3
- package/nitrogen/generated/ios/NitroSecuritiConsentSdk-Swift-Cxx-Bridge.hpp +8 -8
- package/nitrogen/generated/ios/NitroSecuritiConsentSdkAutolinking.mm +1 -1
- package/nitrogen/generated/ios/NitroSecuritiConsentSdkAutolinking.swift +2 -2
- package/nitrogen/generated/ios/swift/HybridConsentSDKSpec_cxx.swift +5 -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 +4 -6
- package/nitrogen/generated/shared/c++/PermissionConsent.hpp +4 -6
- package/nitrogen/generated/shared/c++/PostConsentsRequest.hpp +10 -12
- package/nitrogen/generated/shared/c++/Purpose.hpp +7 -9
- 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 +4 -6
- package/package.json +1 -1
|
@@ -77,12 +77,12 @@ namespace margelo::nitro::securiticonsentsdk::bridge::swift {
|
|
|
77
77
|
};
|
|
78
78
|
}
|
|
79
79
|
|
|
80
|
-
// pragma MARK: std::shared_ptr<
|
|
81
|
-
std::shared_ptr<
|
|
80
|
+
// pragma MARK: std::shared_ptr<HybridConsentSDKSpec>
|
|
81
|
+
std::shared_ptr<HybridConsentSDKSpec> create_std__shared_ptr_HybridConsentSDKSpec_(void* _Nonnull swiftUnsafePointer) {
|
|
82
82
|
NitroSecuritiConsentSdk::HybridConsentSDKSpec_cxx swiftPart = NitroSecuritiConsentSdk::HybridConsentSDKSpec_cxx::fromUnsafe(swiftUnsafePointer);
|
|
83
83
|
return std::make_shared<margelo::nitro::securiticonsentsdk::HybridConsentSDKSpecSwift>(swiftPart);
|
|
84
84
|
}
|
|
85
|
-
void* _Nonnull
|
|
85
|
+
void* _Nonnull get_std__shared_ptr_HybridConsentSDKSpec_(std__shared_ptr_HybridConsentSDKSpec_ cppType) {
|
|
86
86
|
std::shared_ptr<margelo::nitro::securiticonsentsdk::HybridConsentSDKSpecSwift> swiftWrapper = std::dynamic_pointer_cast<margelo::nitro::securiticonsentsdk::HybridConsentSDKSpecSwift>(cppType);
|
|
87
87
|
#ifdef NITRO_DEBUG
|
|
88
88
|
if (swiftWrapper == nullptr) [[unlikely]] {
|
|
@@ -502,17 +502,17 @@ namespace margelo::nitro::securiticonsentsdk::bridge::swift {
|
|
|
502
502
|
return vector;
|
|
503
503
|
}
|
|
504
504
|
|
|
505
|
-
// pragma MARK: std::shared_ptr<
|
|
505
|
+
// pragma MARK: std::shared_ptr<HybridConsentSDKSpec>
|
|
506
506
|
/**
|
|
507
|
-
* Specialized version of `std::shared_ptr<
|
|
507
|
+
* Specialized version of `std::shared_ptr<HybridConsentSDKSpec>`.
|
|
508
508
|
*/
|
|
509
|
-
using
|
|
510
|
-
std::shared_ptr<
|
|
511
|
-
void* _Nonnull
|
|
509
|
+
using std__shared_ptr_HybridConsentSDKSpec_ = std::shared_ptr<HybridConsentSDKSpec>;
|
|
510
|
+
std::shared_ptr<HybridConsentSDKSpec> create_std__shared_ptr_HybridConsentSDKSpec_(void* _Nonnull swiftUnsafePointer);
|
|
511
|
+
void* _Nonnull get_std__shared_ptr_HybridConsentSDKSpec_(std__shared_ptr_HybridConsentSDKSpec_ cppType);
|
|
512
512
|
|
|
513
|
-
// pragma MARK: std::weak_ptr<
|
|
514
|
-
using
|
|
515
|
-
inline
|
|
513
|
+
// pragma MARK: std::weak_ptr<HybridConsentSDKSpec>
|
|
514
|
+
using std__weak_ptr_HybridConsentSDKSpec_ = std::weak_ptr<HybridConsentSDKSpec>;
|
|
515
|
+
inline std__weak_ptr_HybridConsentSDKSpec_ weakify_std__shared_ptr_HybridConsentSDKSpec_(const std::shared_ptr<HybridConsentSDKSpec>& strong) { return strong; }
|
|
516
516
|
|
|
517
517
|
// pragma MARK: Result<void>
|
|
518
518
|
using Result_void_ = Result<void>;
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
HybridObjectRegistry::registerHybridObjectConstructor(
|
|
25
25
|
"ConsentSDK",
|
|
26
26
|
[]() -> std::shared_ptr<HybridObject> {
|
|
27
|
-
std::shared_ptr<
|
|
27
|
+
std::shared_ptr<HybridConsentSDKSpec> hybridObject = NitroSecuritiConsentSdk::NitroSecuritiConsentSdkAutolinking::createConsentSDK();
|
|
28
28
|
return hybridObject;
|
|
29
29
|
}
|
|
30
30
|
);
|
|
@@ -15,9 +15,9 @@ public final class NitroSecuritiConsentSdkAutolinking {
|
|
|
15
15
|
* This is generated by Nitrogen and will initialize the class specified
|
|
16
16
|
* in the `"autolinking"` property of `nitro.json` (in this case, `HybridConsentSDK`).
|
|
17
17
|
*/
|
|
18
|
-
public static func createConsentSDK() -> bridge.
|
|
18
|
+
public static func createConsentSDK() -> bridge.std__shared_ptr_HybridConsentSDKSpec_ {
|
|
19
19
|
let hybridObject = HybridConsentSDK()
|
|
20
|
-
return { () -> bridge.
|
|
20
|
+
return { () -> bridge.std__shared_ptr_HybridConsentSDKSpec_ in
|
|
21
21
|
let __cxxWrapped = hybridObject.getCxxWrapper()
|
|
22
22
|
return __cxxWrapped.getCxxPart()
|
|
23
23
|
}()
|
|
@@ -33,7 +33,7 @@ open class HybridConsentSDKSpec_cxx {
|
|
|
33
33
|
/**
|
|
34
34
|
* Holds a weak pointer to the C++ class that wraps the Swift class.
|
|
35
35
|
*/
|
|
36
|
-
private var __cxxPart: bridge.
|
|
36
|
+
private var __cxxPart: bridge.std__weak_ptr_HybridConsentSDKSpec_
|
|
37
37
|
|
|
38
38
|
/**
|
|
39
39
|
* Create a new `HybridConsentSDKSpec_cxx` that wraps the given `HybridConsentSDKSpec`.
|
|
@@ -72,15 +72,15 @@ open class HybridConsentSDKSpec_cxx {
|
|
|
72
72
|
|
|
73
73
|
/**
|
|
74
74
|
* Gets (or creates) the C++ part of this Hybrid Object.
|
|
75
|
-
* The C++ part is a `std::shared_ptr<
|
|
75
|
+
* The C++ part is a `std::shared_ptr<HybridConsentSDKSpec>`.
|
|
76
76
|
*/
|
|
77
|
-
public func getCxxPart() -> bridge.
|
|
77
|
+
public func getCxxPart() -> bridge.std__shared_ptr_HybridConsentSDKSpec_ {
|
|
78
78
|
let cachedCxxPart = self.__cxxPart.lock()
|
|
79
79
|
if cachedCxxPart.__convertToBool() {
|
|
80
80
|
return cachedCxxPart
|
|
81
81
|
} else {
|
|
82
|
-
let newCxxPart = bridge.
|
|
83
|
-
__cxxPart = bridge.
|
|
82
|
+
let newCxxPart = bridge.create_std__shared_ptr_HybridConsentSDKSpec_(self.toUnsafe())
|
|
83
|
+
__cxxPart = bridge.weakify_std__shared_ptr_HybridConsentSDKSpec_(newCxxPart)
|
|
84
84
|
return newCxxPart
|
|
85
85
|
}
|
|
86
86
|
}
|
|
@@ -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));
|
|
@@ -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));
|
|
@@ -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));
|
|
@@ -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;
|
|
@@ -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));
|
|
@@ -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.136.0-
|
|
3
|
+
"version": "1.136.0-7rc",
|
|
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",
|