securiti-consent-sdk 1.132.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (86) hide show
  1. package/NitroSecuritiConsentSdk.podspec +37 -0
  2. package/README.md +45 -0
  3. package/android/CMakeLists.txt +29 -0
  4. package/android/build.gradle +146 -0
  5. package/android/gradle.properties +5 -0
  6. package/android/src/main/AndroidManifest.xml +2 -0
  7. package/android/src/main/cpp/cpp-adapter.cpp +6 -0
  8. package/android/src/main/java/com/margelo/nitro/securiticonsentsdk/HybridConsentSDK.kt +669 -0
  9. package/android/src/main/java/com/margelo/nitro/securiticonsentsdk/NitroSecuritiConsentSdkPackage.java +33 -0
  10. package/ios/Bridge.h +10 -0
  11. package/ios/HybridConsentSDK.swift +640 -0
  12. package/nitrogen/generated/.gitattributes +1 -0
  13. package/nitrogen/generated/android/NitroSecuritiConsentSdk+autolinking.cmake +78 -0
  14. package/nitrogen/generated/android/NitroSecuritiConsentSdk+autolinking.gradle +27 -0
  15. package/nitrogen/generated/android/NitroSecuritiConsentSdkOnLoad.cpp +48 -0
  16. package/nitrogen/generated/android/NitroSecuritiConsentSdkOnLoad.hpp +25 -0
  17. package/nitrogen/generated/android/c++/JAppPermission.hpp +86 -0
  18. package/nitrogen/generated/android/c++/JBannerConfig.hpp +194 -0
  19. package/nitrogen/generated/android/c++/JCmpSDKOptions.hpp +94 -0
  20. package/nitrogen/generated/android/c++/JCustomColors.hpp +82 -0
  21. package/nitrogen/generated/android/c++/JFunc_void_bool.hpp +74 -0
  22. package/nitrogen/generated/android/c++/JHybridConsentSDKSpec.cpp +277 -0
  23. package/nitrogen/generated/android/c++/JHybridConsentSDKSpec.hpp +78 -0
  24. package/nitrogen/generated/android/c++/JPermissionConsent.hpp +61 -0
  25. package/nitrogen/generated/android/c++/JPostConsentsRequest.hpp +137 -0
  26. package/nitrogen/generated/android/c++/JPurpose.hpp +118 -0
  27. package/nitrogen/generated/android/c++/JPurposeConsent.hpp +65 -0
  28. package/nitrogen/generated/android/c++/JSDK.hpp +104 -0
  29. package/nitrogen/generated/android/c++/JSettingsPrompt.hpp +88 -0
  30. package/nitrogen/generated/android/kotlin/com/margelo/nitro/securiticonsentsdk/AppPermission.kt +34 -0
  31. package/nitrogen/generated/android/kotlin/com/margelo/nitro/securiticonsentsdk/BannerConfig.kt +57 -0
  32. package/nitrogen/generated/android/kotlin/com/margelo/nitro/securiticonsentsdk/CmpSDKOptions.kt +36 -0
  33. package/nitrogen/generated/android/kotlin/com/margelo/nitro/securiticonsentsdk/CustomColors.kt +33 -0
  34. package/nitrogen/generated/android/kotlin/com/margelo/nitro/securiticonsentsdk/Func_void_bool.kt +80 -0
  35. package/nitrogen/generated/android/kotlin/com/margelo/nitro/securiticonsentsdk/HybridConsentSDKSpec.kt +121 -0
  36. package/nitrogen/generated/android/kotlin/com/margelo/nitro/securiticonsentsdk/NitroSecuritiConsentSdkOnLoad.kt +35 -0
  37. package/nitrogen/generated/android/kotlin/com/margelo/nitro/securiticonsentsdk/PermissionConsent.kt +28 -0
  38. package/nitrogen/generated/android/kotlin/com/margelo/nitro/securiticonsentsdk/PostConsentsRequest.kt +37 -0
  39. package/nitrogen/generated/android/kotlin/com/margelo/nitro/securiticonsentsdk/Purpose.kt +37 -0
  40. package/nitrogen/generated/android/kotlin/com/margelo/nitro/securiticonsentsdk/PurposeConsent.kt +29 -0
  41. package/nitrogen/generated/android/kotlin/com/margelo/nitro/securiticonsentsdk/SDK.kt +34 -0
  42. package/nitrogen/generated/android/kotlin/com/margelo/nitro/securiticonsentsdk/SettingsPrompt.kt +30 -0
  43. package/nitrogen/generated/ios/NitroSecuritiConsentSdk+autolinking.rb +60 -0
  44. package/nitrogen/generated/ios/NitroSecuritiConsentSdk-Swift-Cxx-Bridge.cpp +96 -0
  45. package/nitrogen/generated/ios/NitroSecuritiConsentSdk-Swift-Cxx-Bridge.hpp +604 -0
  46. package/nitrogen/generated/ios/NitroSecuritiConsentSdk-Swift-Cxx-Umbrella.hpp +78 -0
  47. package/nitrogen/generated/ios/NitroSecuritiConsentSdkAutolinking.mm +33 -0
  48. package/nitrogen/generated/ios/NitroSecuritiConsentSdkAutolinking.swift +25 -0
  49. package/nitrogen/generated/ios/c++/HybridConsentSDKSpecSwift.cpp +11 -0
  50. package/nitrogen/generated/ios/c++/HybridConsentSDKSpecSwift.hpp +223 -0
  51. package/nitrogen/generated/ios/swift/AppPermission.swift +267 -0
  52. package/nitrogen/generated/ios/swift/BannerConfig.swift +918 -0
  53. package/nitrogen/generated/ios/swift/CmpSDKOptions.swift +217 -0
  54. package/nitrogen/generated/ios/swift/CustomColors.swift +256 -0
  55. package/nitrogen/generated/ios/swift/Func_void_bool.swift +46 -0
  56. package/nitrogen/generated/ios/swift/Func_void_std__exception_ptr.swift +46 -0
  57. package/nitrogen/generated/ios/swift/Func_void_std__optional_BannerConfig_.swift +52 -0
  58. package/nitrogen/generated/ios/swift/Func_void_std__optional_SettingsPrompt_.swift +52 -0
  59. package/nitrogen/generated/ios/swift/Func_void_std__string.swift +46 -0
  60. package/nitrogen/generated/ios/swift/Func_void_std__vector_AppPermission_.swift +46 -0
  61. package/nitrogen/generated/ios/swift/Func_void_std__vector_Purpose_.swift +46 -0
  62. package/nitrogen/generated/ios/swift/Func_void_std__vector_SDK_.swift +46 -0
  63. package/nitrogen/generated/ios/swift/HybridConsentSDKSpec.swift +64 -0
  64. package/nitrogen/generated/ios/swift/HybridConsentSDKSpec_cxx.swift +398 -0
  65. package/nitrogen/generated/ios/swift/PermissionConsent.swift +57 -0
  66. package/nitrogen/generated/ios/swift/PostConsentsRequest.swift +216 -0
  67. package/nitrogen/generated/ios/swift/Purpose.swift +354 -0
  68. package/nitrogen/generated/ios/swift/PurposeConsent.swift +68 -0
  69. package/nitrogen/generated/ios/swift/SDK.swift +285 -0
  70. package/nitrogen/generated/ios/swift/SettingsPrompt.swift +181 -0
  71. package/nitrogen/generated/shared/c++/AppPermission.hpp +102 -0
  72. package/nitrogen/generated/shared/c++/BannerConfig.hpp +197 -0
  73. package/nitrogen/generated/shared/c++/CmpSDKOptions.hpp +110 -0
  74. package/nitrogen/generated/shared/c++/CustomColors.hpp +98 -0
  75. package/nitrogen/generated/shared/c++/HybridConsentSDKSpec.cpp +37 -0
  76. package/nitrogen/generated/shared/c++/HybridConsentSDKSpec.hpp +102 -0
  77. package/nitrogen/generated/shared/c++/PermissionConsent.hpp +77 -0
  78. package/nitrogen/generated/shared/c++/PostConsentsRequest.hpp +120 -0
  79. package/nitrogen/generated/shared/c++/Purpose.hpp +117 -0
  80. package/nitrogen/generated/shared/c++/PurposeConsent.hpp +81 -0
  81. package/nitrogen/generated/shared/c++/SDK.hpp +103 -0
  82. package/nitrogen/generated/shared/c++/SettingsPrompt.hpp +87 -0
  83. package/package.json +107 -0
  84. package/react-native.config.js +16 -0
  85. package/src/ConsentSDK.nitro.ts +232 -0
  86. package/src/index.ts +133 -0
@@ -0,0 +1,78 @@
1
+ ///
2
+ /// NitroSecuritiConsentSdk-Swift-Cxx-Umbrella.hpp
3
+ /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
+ /// https://github.com/mrousavy/nitro
5
+ /// Copyright © 2025 Marc Rousavy @ Margelo
6
+ ///
7
+
8
+ #pragma once
9
+
10
+ // Forward declarations of C++ defined types
11
+ // Forward declaration of `AppPermission` to properly resolve imports.
12
+ namespace margelo::nitro::securiticonsentsdk { struct AppPermission; }
13
+ // Forward declaration of `BannerConfig` to properly resolve imports.
14
+ namespace margelo::nitro::securiticonsentsdk { struct BannerConfig; }
15
+ // Forward declaration of `CmpSDKOptions` to properly resolve imports.
16
+ namespace margelo::nitro::securiticonsentsdk { struct CmpSDKOptions; }
17
+ // Forward declaration of `CustomColors` to properly resolve imports.
18
+ namespace margelo::nitro::securiticonsentsdk { struct CustomColors; }
19
+ // Forward declaration of `HybridConsentSDKSpec` to properly resolve imports.
20
+ namespace margelo::nitro::securiticonsentsdk { class HybridConsentSDKSpec; }
21
+ // Forward declaration of `PermissionConsent` to properly resolve imports.
22
+ namespace margelo::nitro::securiticonsentsdk { struct PermissionConsent; }
23
+ // Forward declaration of `PostConsentsRequest` to properly resolve imports.
24
+ namespace margelo::nitro::securiticonsentsdk { struct PostConsentsRequest; }
25
+ // Forward declaration of `PurposeConsent` to properly resolve imports.
26
+ namespace margelo::nitro::securiticonsentsdk { struct PurposeConsent; }
27
+ // Forward declaration of `Purpose` to properly resolve imports.
28
+ namespace margelo::nitro::securiticonsentsdk { struct Purpose; }
29
+ // Forward declaration of `SDK` to properly resolve imports.
30
+ namespace margelo::nitro::securiticonsentsdk { struct SDK; }
31
+ // Forward declaration of `SettingsPrompt` to properly resolve imports.
32
+ namespace margelo::nitro::securiticonsentsdk { struct SettingsPrompt; }
33
+
34
+ // Include C++ defined types
35
+ #include "AppPermission.hpp"
36
+ #include "BannerConfig.hpp"
37
+ #include "CmpSDKOptions.hpp"
38
+ #include "CustomColors.hpp"
39
+ #include "HybridConsentSDKSpec.hpp"
40
+ #include "PermissionConsent.hpp"
41
+ #include "PostConsentsRequest.hpp"
42
+ #include "Purpose.hpp"
43
+ #include "PurposeConsent.hpp"
44
+ #include "SDK.hpp"
45
+ #include "SettingsPrompt.hpp"
46
+ #include <NitroModules/Promise.hpp>
47
+ #include <NitroModules/Result.hpp>
48
+ #include <exception>
49
+ #include <functional>
50
+ #include <memory>
51
+ #include <optional>
52
+ #include <string>
53
+ #include <unordered_map>
54
+ #include <vector>
55
+
56
+ // C++ helpers for Swift
57
+ #include "NitroSecuritiConsentSdk-Swift-Cxx-Bridge.hpp"
58
+
59
+ // Common C++ types used in Swift
60
+ #include <NitroModules/ArrayBufferHolder.hpp>
61
+ #include <NitroModules/AnyMapHolder.hpp>
62
+ #include <NitroModules/RuntimeError.hpp>
63
+
64
+ // Forward declarations of Swift defined types
65
+ // Forward declaration of `HybridConsentSDKSpec_cxx` to properly resolve imports.
66
+ namespace NitroSecuritiConsentSdk { class HybridConsentSDKSpec_cxx; }
67
+
68
+ // Include Swift defined types
69
+ #if __has_include("NitroSecuritiConsentSdk-Swift.h")
70
+ // This header is generated by Xcode/Swift on every app build.
71
+ // If it cannot be found, make sure the Swift module's name (= podspec name) is actually "NitroSecuritiConsentSdk".
72
+ #include "NitroSecuritiConsentSdk-Swift.h"
73
+ // Same as above, but used when building with frameworks (`use_frameworks`)
74
+ #elif __has_include(<NitroSecuritiConsentSdk/NitroSecuritiConsentSdk-Swift.h>)
75
+ #include <NitroSecuritiConsentSdk/NitroSecuritiConsentSdk-Swift.h>
76
+ #else
77
+ #error NitroSecuritiConsentSdk's autogenerated Swift header cannot be found! Make sure the Swift module's name (= podspec name) is actually "NitroSecuritiConsentSdk", and try building the app first.
78
+ #endif
@@ -0,0 +1,33 @@
1
+ ///
2
+ /// NitroSecuritiConsentSdkAutolinking.mm
3
+ /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
+ /// https://github.com/mrousavy/nitro
5
+ /// Copyright © 2025 Marc Rousavy @ Margelo
6
+ ///
7
+
8
+ #import <Foundation/Foundation.h>
9
+ #import <NitroModules/HybridObjectRegistry.hpp>
10
+ #import "NitroSecuritiConsentSdk-Swift-Cxx-Umbrella.hpp"
11
+ #import <type_traits>
12
+
13
+ #include "HybridConsentSDKSpecSwift.hpp"
14
+
15
+ @interface NitroSecuritiConsentSdkAutolinking : NSObject
16
+ @end
17
+
18
+ @implementation NitroSecuritiConsentSdkAutolinking
19
+
20
+ + (void) load {
21
+ using namespace margelo::nitro;
22
+ using namespace margelo::nitro::securiticonsentsdk;
23
+
24
+ HybridObjectRegistry::registerHybridObjectConstructor(
25
+ "ConsentSDK",
26
+ []() -> std::shared_ptr<HybridObject> {
27
+ std::shared_ptr<margelo::nitro::securiticonsentsdk::HybridConsentSDKSpec> hybridObject = NitroSecuritiConsentSdk::NitroSecuritiConsentSdkAutolinking::createConsentSDK();
28
+ return hybridObject;
29
+ }
30
+ );
31
+ }
32
+
33
+ @end
@@ -0,0 +1,25 @@
1
+ ///
2
+ /// NitroSecuritiConsentSdkAutolinking.swift
3
+ /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
+ /// https://github.com/mrousavy/nitro
5
+ /// Copyright © 2025 Marc Rousavy @ Margelo
6
+ ///
7
+
8
+ public final class NitroSecuritiConsentSdkAutolinking {
9
+ public typealias bridge = margelo.nitro.securiticonsentsdk.bridge.swift
10
+
11
+ /**
12
+ * Creates an instance of a Swift class that implements `HybridConsentSDKSpec`,
13
+ * and wraps it in a Swift class that can directly interop with C++ (`HybridConsentSDKSpec_cxx`)
14
+ *
15
+ * This is generated by Nitrogen and will initialize the class specified
16
+ * in the `"autolinking"` property of `nitro.json` (in this case, `HybridConsentSDK`).
17
+ */
18
+ public static func createConsentSDK() -> bridge.std__shared_ptr_margelo__nitro__securiticonsentsdk__HybridConsentSDKSpec_ {
19
+ let hybridObject = HybridConsentSDK()
20
+ return { () -> bridge.std__shared_ptr_margelo__nitro__securiticonsentsdk__HybridConsentSDKSpec_ in
21
+ let __cxxWrapped = hybridObject.getCxxWrapper()
22
+ return __cxxWrapped.getCxxPart()
23
+ }()
24
+ }
25
+ }
@@ -0,0 +1,11 @@
1
+ ///
2
+ /// HybridConsentSDKSpecSwift.cpp
3
+ /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
+ /// https://github.com/mrousavy/nitro
5
+ /// Copyright © 2025 Marc Rousavy @ Margelo
6
+ ///
7
+
8
+ #include "HybridConsentSDKSpecSwift.hpp"
9
+
10
+ namespace margelo::nitro::securiticonsentsdk {
11
+ } // namespace margelo::nitro::securiticonsentsdk
@@ -0,0 +1,223 @@
1
+ ///
2
+ /// HybridConsentSDKSpecSwift.hpp
3
+ /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
+ /// https://github.com/mrousavy/nitro
5
+ /// Copyright © 2025 Marc Rousavy @ Margelo
6
+ ///
7
+
8
+ #pragma once
9
+
10
+ #include "HybridConsentSDKSpec.hpp"
11
+
12
+ // Forward declaration of `HybridConsentSDKSpec_cxx` to properly resolve imports.
13
+ namespace NitroSecuritiConsentSdk { class HybridConsentSDKSpec_cxx; }
14
+
15
+ // Forward declaration of `CmpSDKOptions` to properly resolve imports.
16
+ namespace margelo::nitro::securiticonsentsdk { struct CmpSDKOptions; }
17
+ // Forward declaration of `AppPermission` to properly resolve imports.
18
+ namespace margelo::nitro::securiticonsentsdk { struct AppPermission; }
19
+ // Forward declaration of `Purpose` to properly resolve imports.
20
+ namespace margelo::nitro::securiticonsentsdk { struct Purpose; }
21
+ // Forward declaration of `SDK` to properly resolve imports.
22
+ namespace margelo::nitro::securiticonsentsdk { struct SDK; }
23
+ // Forward declaration of `BannerConfig` to properly resolve imports.
24
+ namespace margelo::nitro::securiticonsentsdk { struct BannerConfig; }
25
+ // Forward declaration of `CustomColors` to properly resolve imports.
26
+ namespace margelo::nitro::securiticonsentsdk { struct CustomColors; }
27
+ // Forward declaration of `SettingsPrompt` to properly resolve imports.
28
+ namespace margelo::nitro::securiticonsentsdk { struct SettingsPrompt; }
29
+ // Forward declaration of `PostConsentsRequest` to properly resolve imports.
30
+ namespace margelo::nitro::securiticonsentsdk { struct PostConsentsRequest; }
31
+ // Forward declaration of `PurposeConsent` to properly resolve imports.
32
+ namespace margelo::nitro::securiticonsentsdk { struct PurposeConsent; }
33
+ // Forward declaration of `PermissionConsent` to properly resolve imports.
34
+ namespace margelo::nitro::securiticonsentsdk { struct PermissionConsent; }
35
+
36
+ #include "CmpSDKOptions.hpp"
37
+ #include <string>
38
+ #include <optional>
39
+ #include <functional>
40
+ #include <NitroModules/Promise.hpp>
41
+ #include <vector>
42
+ #include "AppPermission.hpp"
43
+ #include "Purpose.hpp"
44
+ #include "SDK.hpp"
45
+ #include "BannerConfig.hpp"
46
+ #include "CustomColors.hpp"
47
+ #include <unordered_map>
48
+ #include "SettingsPrompt.hpp"
49
+ #include "PostConsentsRequest.hpp"
50
+ #include "PurposeConsent.hpp"
51
+ #include "PermissionConsent.hpp"
52
+
53
+ #include "NitroSecuritiConsentSdk-Swift-Cxx-Umbrella.hpp"
54
+
55
+ namespace margelo::nitro::securiticonsentsdk {
56
+
57
+ /**
58
+ * The C++ part of HybridConsentSDKSpec_cxx.swift.
59
+ *
60
+ * HybridConsentSDKSpecSwift (C++) accesses HybridConsentSDKSpec_cxx (Swift), and might
61
+ * contain some additional bridging code for C++ <> Swift interop.
62
+ *
63
+ * Since this obviously introduces an overhead, I hope at some point in
64
+ * the future, HybridConsentSDKSpec_cxx can directly inherit from the C++ class HybridConsentSDKSpec
65
+ * to simplify the whole structure and memory management.
66
+ */
67
+ class HybridConsentSDKSpecSwift: public virtual HybridConsentSDKSpec {
68
+ public:
69
+ // Constructor from a Swift instance
70
+ explicit HybridConsentSDKSpecSwift(const NitroSecuritiConsentSdk::HybridConsentSDKSpec_cxx& swiftPart):
71
+ HybridObject(HybridConsentSDKSpec::TAG),
72
+ _swiftPart(swiftPart) { }
73
+
74
+ public:
75
+ // Get the Swift part
76
+ inline NitroSecuritiConsentSdk::HybridConsentSDKSpec_cxx& getSwiftPart() noexcept {
77
+ return _swiftPart;
78
+ }
79
+
80
+ public:
81
+ // Get memory pressure
82
+ inline size_t getExternalMemorySize() noexcept override {
83
+ return _swiftPart.getMemorySize();
84
+ }
85
+
86
+ public:
87
+ // Properties
88
+
89
+
90
+ public:
91
+ // Methods
92
+ inline void initialize(const CmpSDKOptions& options) override {
93
+ auto __result = _swiftPart.initialize(options);
94
+ if (__result.hasError()) [[unlikely]] {
95
+ std::rethrow_exception(__result.error());
96
+ }
97
+ }
98
+ inline bool isSdkReady() override {
99
+ auto __result = _swiftPart.isSdkReady();
100
+ if (__result.hasError()) [[unlikely]] {
101
+ std::rethrow_exception(__result.error());
102
+ }
103
+ auto __value = std::move(__result.value());
104
+ return __value;
105
+ }
106
+ inline void presentConsentBanner() override {
107
+ auto __result = _swiftPart.presentConsentBanner();
108
+ if (__result.hasError()) [[unlikely]] {
109
+ std::rethrow_exception(__result.error());
110
+ }
111
+ }
112
+ inline void presentPreferenceCenter() override {
113
+ auto __result = _swiftPart.presentPreferenceCenter();
114
+ if (__result.hasError()) [[unlikely]] {
115
+ std::rethrow_exception(__result.error());
116
+ }
117
+ }
118
+ inline void isReady(const std::function<void(bool /* isReady */)>& callback) override {
119
+ auto __result = _swiftPart.isReady(callback);
120
+ if (__result.hasError()) [[unlikely]] {
121
+ std::rethrow_exception(__result.error());
122
+ }
123
+ }
124
+ inline void resetConsents() override {
125
+ auto __result = _swiftPart.resetConsents();
126
+ if (__result.hasError()) [[unlikely]] {
127
+ std::rethrow_exception(__result.error());
128
+ }
129
+ }
130
+ inline std::shared_ptr<Promise<std::string>> getConsentByPurposeId(double purposeId) override {
131
+ auto __result = _swiftPart.getConsentByPurposeId(std::forward<decltype(purposeId)>(purposeId));
132
+ if (__result.hasError()) [[unlikely]] {
133
+ std::rethrow_exception(__result.error());
134
+ }
135
+ auto __value = std::move(__result.value());
136
+ return __value;
137
+ }
138
+ inline std::shared_ptr<Promise<std::string>> getConsentByPermissionId(const std::string& permissionId) override {
139
+ auto __result = _swiftPart.getConsentByPermissionId(permissionId);
140
+ if (__result.hasError()) [[unlikely]] {
141
+ std::rethrow_exception(__result.error());
142
+ }
143
+ auto __value = std::move(__result.value());
144
+ return __value;
145
+ }
146
+ inline std::shared_ptr<Promise<std::vector<AppPermission>>> getPermissions() override {
147
+ auto __result = _swiftPart.getPermissions();
148
+ if (__result.hasError()) [[unlikely]] {
149
+ std::rethrow_exception(__result.error());
150
+ }
151
+ auto __value = std::move(__result.value());
152
+ return __value;
153
+ }
154
+ inline std::shared_ptr<Promise<std::vector<Purpose>>> getPurposes() override {
155
+ auto __result = _swiftPart.getPurposes();
156
+ if (__result.hasError()) [[unlikely]] {
157
+ std::rethrow_exception(__result.error());
158
+ }
159
+ auto __value = std::move(__result.value());
160
+ return __value;
161
+ }
162
+ inline std::shared_ptr<Promise<std::vector<SDK>>> getSdksInPurpose(double purposeId) override {
163
+ auto __result = _swiftPart.getSdksInPurpose(std::forward<decltype(purposeId)>(purposeId));
164
+ if (__result.hasError()) [[unlikely]] {
165
+ std::rethrow_exception(__result.error());
166
+ }
167
+ auto __value = std::move(__result.value());
168
+ return __value;
169
+ }
170
+ inline bool setPurposeConsent(const Purpose& purpose, const std::string& consent) override {
171
+ auto __result = _swiftPart.setPurposeConsent(purpose, consent);
172
+ if (__result.hasError()) [[unlikely]] {
173
+ std::rethrow_exception(__result.error());
174
+ }
175
+ auto __value = std::move(__result.value());
176
+ return __value;
177
+ }
178
+ inline bool setPermissionConsent(const AppPermission& permission, const std::string& consent) override {
179
+ auto __result = _swiftPart.setPermissionConsent(permission, consent);
180
+ if (__result.hasError()) [[unlikely]] {
181
+ std::rethrow_exception(__result.error());
182
+ }
183
+ auto __value = std::move(__result.value());
184
+ return __value;
185
+ }
186
+ inline std::shared_ptr<Promise<std::optional<BannerConfig>>> getBannerConfig() override {
187
+ auto __result = _swiftPart.getBannerConfig();
188
+ if (__result.hasError()) [[unlikely]] {
189
+ std::rethrow_exception(__result.error());
190
+ }
191
+ auto __value = std::move(__result.value());
192
+ return __value;
193
+ }
194
+ inline std::optional<CmpSDKOptions> options() override {
195
+ auto __result = _swiftPart.options();
196
+ if (__result.hasError()) [[unlikely]] {
197
+ std::rethrow_exception(__result.error());
198
+ }
199
+ auto __value = std::move(__result.value());
200
+ return __value;
201
+ }
202
+ inline std::shared_ptr<Promise<std::optional<SettingsPrompt>>> getSettingsPrompt() override {
203
+ auto __result = _swiftPart.getSettingsPrompt();
204
+ if (__result.hasError()) [[unlikely]] {
205
+ std::rethrow_exception(__result.error());
206
+ }
207
+ auto __value = std::move(__result.value());
208
+ return __value;
209
+ }
210
+ inline std::shared_ptr<Promise<bool>> uploadConsents(const PostConsentsRequest& request) override {
211
+ auto __result = _swiftPart.uploadConsents(request);
212
+ if (__result.hasError()) [[unlikely]] {
213
+ std::rethrow_exception(__result.error());
214
+ }
215
+ auto __value = std::move(__result.value());
216
+ return __value;
217
+ }
218
+
219
+ private:
220
+ NitroSecuritiConsentSdk::HybridConsentSDKSpec_cxx _swiftPart;
221
+ };
222
+
223
+ } // namespace margelo::nitro::securiticonsentsdk
@@ -0,0 +1,267 @@
1
+ ///
2
+ /// AppPermission.swift
3
+ /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
+ /// https://github.com/mrousavy/nitro
5
+ /// Copyright © 2025 Marc Rousavy @ Margelo
6
+ ///
7
+
8
+ import NitroModules
9
+
10
+ /**
11
+ * Represents an instance of `AppPermission`, backed by a C++ struct.
12
+ */
13
+ public typealias AppPermission = margelo.nitro.securiticonsentsdk.AppPermission
14
+
15
+ public extension AppPermission {
16
+ private typealias bridge = margelo.nitro.securiticonsentsdk.bridge.swift
17
+
18
+ /**
19
+ * Create a new instance of `AppPermission`.
20
+ */
21
+ init(id: Double?, name: String?, permissionId: String?, description: String?, group: String?, groupId: Double?, consentStatus: String?, nameMap: String?, isSettingsPromptEnabled: Bool?) {
22
+ self.init({ () -> bridge.std__optional_double_ in
23
+ if let __unwrappedValue = id {
24
+ return bridge.create_std__optional_double_(__unwrappedValue)
25
+ } else {
26
+ return .init()
27
+ }
28
+ }(), { () -> bridge.std__optional_std__string_ in
29
+ if let __unwrappedValue = name {
30
+ return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
31
+ } else {
32
+ return .init()
33
+ }
34
+ }(), { () -> bridge.std__optional_std__string_ in
35
+ if let __unwrappedValue = permissionId {
36
+ return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
37
+ } else {
38
+ return .init()
39
+ }
40
+ }(), { () -> bridge.std__optional_std__string_ in
41
+ if let __unwrappedValue = description {
42
+ return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
43
+ } else {
44
+ return .init()
45
+ }
46
+ }(), { () -> bridge.std__optional_std__string_ in
47
+ if let __unwrappedValue = group {
48
+ return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
49
+ } else {
50
+ return .init()
51
+ }
52
+ }(), { () -> bridge.std__optional_double_ in
53
+ if let __unwrappedValue = groupId {
54
+ return bridge.create_std__optional_double_(__unwrappedValue)
55
+ } else {
56
+ return .init()
57
+ }
58
+ }(), { () -> bridge.std__optional_std__string_ in
59
+ if let __unwrappedValue = consentStatus {
60
+ return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
61
+ } else {
62
+ return .init()
63
+ }
64
+ }(), { () -> bridge.std__optional_std__string_ in
65
+ if let __unwrappedValue = nameMap {
66
+ return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
67
+ } else {
68
+ return .init()
69
+ }
70
+ }(), { () -> bridge.std__optional_bool_ in
71
+ if let __unwrappedValue = isSettingsPromptEnabled {
72
+ return bridge.create_std__optional_bool_(__unwrappedValue)
73
+ } else {
74
+ return .init()
75
+ }
76
+ }())
77
+ }
78
+
79
+ var id: Double? {
80
+ @inline(__always)
81
+ get {
82
+ return self.__id.value
83
+ }
84
+ @inline(__always)
85
+ set {
86
+ self.__id = { () -> bridge.std__optional_double_ in
87
+ if let __unwrappedValue = newValue {
88
+ return bridge.create_std__optional_double_(__unwrappedValue)
89
+ } else {
90
+ return .init()
91
+ }
92
+ }()
93
+ }
94
+ }
95
+
96
+ var name: String? {
97
+ @inline(__always)
98
+ get {
99
+ return { () -> String? in
100
+ if let __unwrapped = self.__name.value {
101
+ return String(__unwrapped)
102
+ } else {
103
+ return nil
104
+ }
105
+ }()
106
+ }
107
+ @inline(__always)
108
+ set {
109
+ self.__name = { () -> bridge.std__optional_std__string_ in
110
+ if let __unwrappedValue = newValue {
111
+ return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
112
+ } else {
113
+ return .init()
114
+ }
115
+ }()
116
+ }
117
+ }
118
+
119
+ var permissionId: String? {
120
+ @inline(__always)
121
+ get {
122
+ return { () -> String? in
123
+ if let __unwrapped = self.__permissionId.value {
124
+ return String(__unwrapped)
125
+ } else {
126
+ return nil
127
+ }
128
+ }()
129
+ }
130
+ @inline(__always)
131
+ set {
132
+ self.__permissionId = { () -> bridge.std__optional_std__string_ in
133
+ if let __unwrappedValue = newValue {
134
+ return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
135
+ } else {
136
+ return .init()
137
+ }
138
+ }()
139
+ }
140
+ }
141
+
142
+ var description: String? {
143
+ @inline(__always)
144
+ get {
145
+ return { () -> String? in
146
+ if let __unwrapped = self.__description.value {
147
+ return String(__unwrapped)
148
+ } else {
149
+ return nil
150
+ }
151
+ }()
152
+ }
153
+ @inline(__always)
154
+ set {
155
+ self.__description = { () -> bridge.std__optional_std__string_ in
156
+ if let __unwrappedValue = newValue {
157
+ return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
158
+ } else {
159
+ return .init()
160
+ }
161
+ }()
162
+ }
163
+ }
164
+
165
+ var group: String? {
166
+ @inline(__always)
167
+ get {
168
+ return { () -> String? in
169
+ if let __unwrapped = self.__group.value {
170
+ return String(__unwrapped)
171
+ } else {
172
+ return nil
173
+ }
174
+ }()
175
+ }
176
+ @inline(__always)
177
+ set {
178
+ self.__group = { () -> bridge.std__optional_std__string_ in
179
+ if let __unwrappedValue = newValue {
180
+ return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
181
+ } else {
182
+ return .init()
183
+ }
184
+ }()
185
+ }
186
+ }
187
+
188
+ var groupId: Double? {
189
+ @inline(__always)
190
+ get {
191
+ return self.__groupId.value
192
+ }
193
+ @inline(__always)
194
+ set {
195
+ self.__groupId = { () -> bridge.std__optional_double_ in
196
+ if let __unwrappedValue = newValue {
197
+ return bridge.create_std__optional_double_(__unwrappedValue)
198
+ } else {
199
+ return .init()
200
+ }
201
+ }()
202
+ }
203
+ }
204
+
205
+ var consentStatus: String? {
206
+ @inline(__always)
207
+ get {
208
+ return { () -> String? in
209
+ if let __unwrapped = self.__consentStatus.value {
210
+ return String(__unwrapped)
211
+ } else {
212
+ return nil
213
+ }
214
+ }()
215
+ }
216
+ @inline(__always)
217
+ set {
218
+ self.__consentStatus = { () -> bridge.std__optional_std__string_ in
219
+ if let __unwrappedValue = newValue {
220
+ return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
221
+ } else {
222
+ return .init()
223
+ }
224
+ }()
225
+ }
226
+ }
227
+
228
+ var nameMap: String? {
229
+ @inline(__always)
230
+ get {
231
+ return { () -> String? in
232
+ if let __unwrapped = self.__nameMap.value {
233
+ return String(__unwrapped)
234
+ } else {
235
+ return nil
236
+ }
237
+ }()
238
+ }
239
+ @inline(__always)
240
+ set {
241
+ self.__nameMap = { () -> bridge.std__optional_std__string_ in
242
+ if let __unwrappedValue = newValue {
243
+ return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
244
+ } else {
245
+ return .init()
246
+ }
247
+ }()
248
+ }
249
+ }
250
+
251
+ var isSettingsPromptEnabled: Bool? {
252
+ @inline(__always)
253
+ get {
254
+ return self.__isSettingsPromptEnabled.value
255
+ }
256
+ @inline(__always)
257
+ set {
258
+ self.__isSettingsPromptEnabled = { () -> bridge.std__optional_bool_ in
259
+ if let __unwrappedValue = newValue {
260
+ return bridge.create_std__optional_bool_(__unwrappedValue)
261
+ } else {
262
+ return .init()
263
+ }
264
+ }()
265
+ }
266
+ }
267
+ }