securiti-consent-sdk 1.135.0 → 1.136.0-11rc

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. package/ios/HybridConsentSDK.swift +1 -0
  2. package/nitrogen/generated/android/NitroSecuritiConsentSdkOnLoad.cpp +1 -2
  3. package/nitrogen/generated/android/c++/JHybridConsentSDKSpec.hpp +1 -0
  4. package/nitrogen/generated/android/kotlin/com/margelo/nitro/securiticonsentsdk/AppPermission.kt +18 -0
  5. package/nitrogen/generated/android/kotlin/com/margelo/nitro/securiticonsentsdk/BannerConfig.kt +64 -0
  6. package/nitrogen/generated/android/kotlin/com/margelo/nitro/securiticonsentsdk/CmpSDKOptions.kt +22 -0
  7. package/nitrogen/generated/android/kotlin/com/margelo/nitro/securiticonsentsdk/CustomColors.kt +16 -0
  8. package/nitrogen/generated/android/kotlin/com/margelo/nitro/securiticonsentsdk/PermissionConsent.kt +6 -0
  9. package/nitrogen/generated/android/kotlin/com/margelo/nitro/securiticonsentsdk/PostConsentsRequest.kt +24 -0
  10. package/nitrogen/generated/android/kotlin/com/margelo/nitro/securiticonsentsdk/Purpose.kt +24 -0
  11. package/nitrogen/generated/android/kotlin/com/margelo/nitro/securiticonsentsdk/PurposeConsent.kt +8 -0
  12. package/nitrogen/generated/android/kotlin/com/margelo/nitro/securiticonsentsdk/SDK.kt +18 -0
  13. package/nitrogen/generated/android/kotlin/com/margelo/nitro/securiticonsentsdk/SettingsPrompt.kt +10 -0
  14. package/nitrogen/generated/ios/NitroSecuritiConsentSdk-Swift-Cxx-Bridge.cpp +11 -11
  15. package/nitrogen/generated/ios/NitroSecuritiConsentSdk-Swift-Cxx-Bridge.hpp +148 -85
  16. package/nitrogen/generated/ios/NitroSecuritiConsentSdkAutolinking.mm +1 -1
  17. package/nitrogen/generated/ios/NitroSecuritiConsentSdkAutolinking.swift +2 -2
  18. package/nitrogen/generated/ios/swift/AppPermission.swift +12 -6
  19. package/nitrogen/generated/ios/swift/BannerConfig.swift +47 -24
  20. package/nitrogen/generated/ios/swift/CmpSDKOptions.swift +8 -4
  21. package/nitrogen/generated/ios/swift/CustomColors.swift +16 -8
  22. package/nitrogen/generated/ios/swift/Func_void_bool.swift +5 -5
  23. package/nitrogen/generated/ios/swift/Func_void_std__optional_BannerConfig_.swift +2 -1
  24. package/nitrogen/generated/ios/swift/Func_void_std__optional_SettingsPrompt_.swift +2 -1
  25. package/nitrogen/generated/ios/swift/HybridConsentSDKSpec_cxx.swift +5 -5
  26. package/nitrogen/generated/ios/swift/PostConsentsRequest.swift +4 -2
  27. package/nitrogen/generated/ios/swift/Purpose.swift +14 -7
  28. package/nitrogen/generated/ios/swift/SDK.swift +14 -7
  29. package/nitrogen/generated/ios/swift/SettingsPrompt.swift +10 -5
  30. package/nitrogen/generated/shared/c++/AppPermission.hpp +4 -6
  31. package/nitrogen/generated/shared/c++/BannerConfig.hpp +7 -9
  32. package/nitrogen/generated/shared/c++/CmpSDKOptions.hpp +4 -6
  33. package/nitrogen/generated/shared/c++/CustomColors.hpp +4 -6
  34. package/nitrogen/generated/shared/c++/PermissionConsent.hpp +4 -6
  35. package/nitrogen/generated/shared/c++/PostConsentsRequest.hpp +10 -12
  36. package/nitrogen/generated/shared/c++/Purpose.hpp +7 -9
  37. package/nitrogen/generated/shared/c++/PurposeConsent.hpp +4 -6
  38. package/nitrogen/generated/shared/c++/SDK.hpp +4 -6
  39. package/nitrogen/generated/shared/c++/SettingsPrompt.hpp +4 -6
  40. package/package.json +1 -1
@@ -62,7 +62,8 @@ public extension SettingsPrompt {
62
62
  @inline(__always)
63
63
  get {
64
64
  return { () -> String? in
65
- if let __unwrapped = self.__promptHeading.value {
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 let __unwrapped = self.__promptMessage.value {
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 let __unwrapped = self.__settingsButtonText.value {
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 let __unwrapped = self.__notNowButtonText.value {
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 let __unwrapped = self.__permissions.value {
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));
@@ -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.135.0",
3
+ "version": "1.136.0-11rc",
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",