securiti-consent-sdk 1.135.0-9rc → 1.135.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 (34) hide show
  1. package/NitroSecuritiConsentSdk.podspec +1 -1
  2. package/android/build.gradle +1 -1
  3. package/lib/index.d.ts +20 -0
  4. package/nitrogen/generated/android/c++/JHybridConsentSDKSpec.cpp +7 -2
  5. package/nitrogen/generated/android/c++/JHybridConsentSDKSpec.hpp +1 -0
  6. package/nitrogen/generated/android/kotlin/com/margelo/nitro/securiticonsentsdk/AppPermission.kt +1 -0
  7. package/nitrogen/generated/android/kotlin/com/margelo/nitro/securiticonsentsdk/BannerConfig.kt +1 -0
  8. package/nitrogen/generated/android/kotlin/com/margelo/nitro/securiticonsentsdk/CmpSDKOptions.kt +1 -0
  9. package/nitrogen/generated/android/kotlin/com/margelo/nitro/securiticonsentsdk/CustomColors.kt +1 -0
  10. package/nitrogen/generated/android/kotlin/com/margelo/nitro/securiticonsentsdk/Func_void_bool.kt +1 -0
  11. package/nitrogen/generated/android/kotlin/com/margelo/nitro/securiticonsentsdk/PermissionConsent.kt +1 -0
  12. package/nitrogen/generated/android/kotlin/com/margelo/nitro/securiticonsentsdk/PostConsentsRequest.kt +1 -0
  13. package/nitrogen/generated/android/kotlin/com/margelo/nitro/securiticonsentsdk/Purpose.kt +1 -0
  14. package/nitrogen/generated/android/kotlin/com/margelo/nitro/securiticonsentsdk/PurposeConsent.kt +1 -0
  15. package/nitrogen/generated/android/kotlin/com/margelo/nitro/securiticonsentsdk/SDK.kt +1 -0
  16. package/nitrogen/generated/android/kotlin/com/margelo/nitro/securiticonsentsdk/SettingsPrompt.kt +1 -0
  17. package/nitrogen/generated/ios/NitroSecuritiConsentSdk-Swift-Cxx-Bridge.cpp +2 -2
  18. package/nitrogen/generated/ios/c++/HybridConsentSDKSpecSwift.hpp +4 -2
  19. package/nitrogen/generated/ios/swift/Func_void_bool.swift +1 -0
  20. package/nitrogen/generated/ios/swift/Func_void_std__exception_ptr.swift +1 -0
  21. package/nitrogen/generated/ios/swift/Func_void_std__optional_BannerConfig_.swift +1 -0
  22. package/nitrogen/generated/ios/swift/Func_void_std__optional_SettingsPrompt_.swift +1 -0
  23. package/nitrogen/generated/ios/swift/Func_void_std__string.swift +1 -0
  24. package/nitrogen/generated/ios/swift/Func_void_std__vector_AppPermission_.swift +1 -0
  25. package/nitrogen/generated/ios/swift/Func_void_std__vector_Purpose_.swift +1 -0
  26. package/nitrogen/generated/ios/swift/Func_void_std__vector_SDK_.swift +1 -0
  27. package/nitrogen/generated/ios/swift/HybridConsentSDKSpec.swift +2 -1
  28. package/nitrogen/generated/ios/swift/HybridConsentSDKSpec_cxx.swift +10 -1
  29. package/nitrogen/generated/shared/c++/CustomColors.hpp +1 -1
  30. package/nitrogen/generated/shared/c++/HybridConsentSDKSpec.hpp +3 -3
  31. package/nitrogen/generated/shared/c++/PostConsentsRequest.hpp +1 -1
  32. package/nitrogen/generated/shared/c++/Purpose.hpp +1 -1
  33. package/nitrogen/generated/shared/c++/SettingsPrompt.hpp +1 -1
  34. package/package.json +1 -1
@@ -32,6 +32,6 @@ Pod::Spec.new do |s|
32
32
 
33
33
  s.dependency 'React-jsi'
34
34
  s.dependency 'React-callinvoker'
35
- s.dependency 'ConsentUI', "1.135.0-9rc"
35
+ s.dependency 'ConsentUI', "1.135.0"
36
36
  install_modules_dependencies(s)
37
37
  end
@@ -126,7 +126,7 @@ repositories {
126
126
  mavenCentral()
127
127
  google()
128
128
  maven {
129
- url = uri("https://cdn-qa.securiti.xyz/consent/maven")
129
+ url = uri("https://cdn-prod.securiti.ai/consent/maven")
130
130
  }
131
131
  }
132
132
 
package/lib/index.d.ts ADDED
@@ -0,0 +1,20 @@
1
+ import type { CmpSDKLoggerLevel, CmpSDKOptions, ConsentStatus, Purpose, AppPermission, SDK, BannerConfig, SettingsPrompt, PostConsentsRequest, ComplianceType, BannerPosition, ButtonShape, CustomColors, PurposeConsent, PermissionConsent, Mode, PurposeObject, PermissionObject } from './ConsentSDK.nitro';
2
+ export type { CmpSDKLoggerLevel, CmpSDKOptions, ConsentStatus, Purpose, AppPermission, SDK, BannerConfig, SettingsPrompt, PostConsentsRequest, ComplianceType, BannerPosition, ButtonShape, CustomColors, PurposeConsent, PermissionConsent, Mode, PurposeObject, PermissionObject, };
3
+ export { LoggerLevel, ModeValues, ConsentStatusValues, ComplianceTypeValues, BannerPositionValues, ButtonShapeValues, } from './ConsentSDK.nitro';
4
+ export declare function initialize(sdkOptions: CmpSDKOptions): void;
5
+ export declare function presentConsentBanner(): void;
6
+ export declare function presentPreferenceCenter(): void;
7
+ export declare function isSdkReady(): boolean;
8
+ export declare function isReady(callback: (isReady: boolean) => void): void;
9
+ export declare function resetConsents(): void;
10
+ export declare function getConsentByPurposeId(purposeId: number): Promise<string>;
11
+ export declare function getConsentByPermissionId(permissionId: string): Promise<string>;
12
+ export declare function getPermissions(): Promise<Array<AppPermission>>;
13
+ export declare function getPurposes(): Promise<Array<Purpose>>;
14
+ export declare function getSdksInPurpose(purposeId: number): Promise<Array<SDK>>;
15
+ export declare function setPurposeConsent(purpose: Purpose, consent: string): boolean;
16
+ export declare function setPermissionConsent(permission: AppPermission, consent: string): boolean;
17
+ export declare function getBannerConfig(): Promise<BannerConfig | null>;
18
+ export declare function options(): CmpSDKOptions | null;
19
+ export declare function getSettingsPrompt(): Promise<SettingsPrompt | null>;
20
+ export declare function uploadConsents(request: PostConsentsRequest): Promise<boolean>;
@@ -28,11 +28,11 @@ namespace margelo::nitro::securiticonsentsdk { struct PurposeConsent; }
28
28
  // Forward declaration of `PermissionConsent` to properly resolve imports.
29
29
  namespace margelo::nitro::securiticonsentsdk { struct PermissionConsent; }
30
30
 
31
- #include <NitroModules/Promise.hpp>
32
31
  #include <string>
32
+ #include <NitroModules/Promise.hpp>
33
33
  #include <NitroModules/JPromise.hpp>
34
- #include <vector>
35
34
  #include "AppPermission.hpp"
35
+ #include <vector>
36
36
  #include "JAppPermission.hpp"
37
37
  #include <optional>
38
38
  #include "Purpose.hpp"
@@ -74,6 +74,11 @@ namespace margelo::nitro::securiticonsentsdk {
74
74
  return method(_javaPart);
75
75
  }
76
76
 
77
+ void JHybridConsentSDKSpec::dispose() noexcept {
78
+ static const auto method = javaClassStatic()->getMethod<void()>("dispose");
79
+ method(_javaPart);
80
+ }
81
+
77
82
  // Properties
78
83
 
79
84
 
@@ -39,6 +39,7 @@ namespace margelo::nitro::securiticonsentsdk {
39
39
 
40
40
  public:
41
41
  size_t getExternalMemorySize() noexcept override;
42
+ void dispose() noexcept override;
42
43
 
43
44
  public:
44
45
  inline const jni::global_ref<JHybridConsentSDKSpec::javaobject>& getJavaPart() const noexcept {
@@ -11,6 +11,7 @@ import androidx.annotation.Keep
11
11
  import com.facebook.proguard.annotations.DoNotStrip
12
12
  import com.margelo.nitro.core.*
13
13
 
14
+
14
15
  /**
15
16
  * Represents the JavaScript object/struct "AppPermission".
16
17
  */
@@ -11,6 +11,7 @@ import androidx.annotation.Keep
11
11
  import com.facebook.proguard.annotations.DoNotStrip
12
12
  import com.margelo.nitro.core.*
13
13
 
14
+
14
15
  /**
15
16
  * Represents the JavaScript object/struct "BannerConfig".
16
17
  */
@@ -11,6 +11,7 @@ import androidx.annotation.Keep
11
11
  import com.facebook.proguard.annotations.DoNotStrip
12
12
  import com.margelo.nitro.core.*
13
13
 
14
+
14
15
  /**
15
16
  * Represents the JavaScript object/struct "CmpSDKOptions".
16
17
  */
@@ -11,6 +11,7 @@ import androidx.annotation.Keep
11
11
  import com.facebook.proguard.annotations.DoNotStrip
12
12
  import com.margelo.nitro.core.*
13
13
 
14
+
14
15
  /**
15
16
  * Represents the JavaScript object/struct "CustomColors".
16
17
  */
@@ -13,6 +13,7 @@ import com.facebook.proguard.annotations.DoNotStrip
13
13
  import com.margelo.nitro.core.*
14
14
  import dalvik.annotation.optimization.FastNative
15
15
 
16
+
16
17
  /**
17
18
  * Represents the JavaScript callback `(isReady: boolean) => void`.
18
19
  * This can be either implemented in C++ (in which case it might be a callback coming from JS),
@@ -11,6 +11,7 @@ import androidx.annotation.Keep
11
11
  import com.facebook.proguard.annotations.DoNotStrip
12
12
  import com.margelo.nitro.core.*
13
13
 
14
+
14
15
  /**
15
16
  * Represents the JavaScript object/struct "PermissionConsent".
16
17
  */
@@ -11,6 +11,7 @@ import androidx.annotation.Keep
11
11
  import com.facebook.proguard.annotations.DoNotStrip
12
12
  import com.margelo.nitro.core.*
13
13
 
14
+
14
15
  /**
15
16
  * Represents the JavaScript object/struct "PostConsentsRequest".
16
17
  */
@@ -11,6 +11,7 @@ import androidx.annotation.Keep
11
11
  import com.facebook.proguard.annotations.DoNotStrip
12
12
  import com.margelo.nitro.core.*
13
13
 
14
+
14
15
  /**
15
16
  * Represents the JavaScript object/struct "Purpose".
16
17
  */
@@ -11,6 +11,7 @@ import androidx.annotation.Keep
11
11
  import com.facebook.proguard.annotations.DoNotStrip
12
12
  import com.margelo.nitro.core.*
13
13
 
14
+
14
15
  /**
15
16
  * Represents the JavaScript object/struct "PurposeConsent".
16
17
  */
@@ -11,6 +11,7 @@ import androidx.annotation.Keep
11
11
  import com.facebook.proguard.annotations.DoNotStrip
12
12
  import com.margelo.nitro.core.*
13
13
 
14
+
14
15
  /**
15
16
  * Represents the JavaScript object/struct "SDK".
16
17
  */
@@ -11,6 +11,7 @@ import androidx.annotation.Keep
11
11
  import com.facebook.proguard.annotations.DoNotStrip
12
12
  import com.margelo.nitro.core.*
13
13
 
14
+
14
15
  /**
15
16
  * Represents the JavaScript object/struct "SettingsPrompt".
16
17
  */
@@ -84,11 +84,11 @@ namespace margelo::nitro::securiticonsentsdk::bridge::swift {
84
84
  }
85
85
  void* _Nonnull get_std__shared_ptr_margelo__nitro__securiticonsentsdk__HybridConsentSDKSpec_(std__shared_ptr_margelo__nitro__securiticonsentsdk__HybridConsentSDKSpec_ cppType) {
86
86
  std::shared_ptr<margelo::nitro::securiticonsentsdk::HybridConsentSDKSpecSwift> swiftWrapper = std::dynamic_pointer_cast<margelo::nitro::securiticonsentsdk::HybridConsentSDKSpecSwift>(cppType);
87
- #ifdef NITRO_DEBUG
87
+ #ifdef NITRO_DEBUG
88
88
  if (swiftWrapper == nullptr) [[unlikely]] {
89
89
  throw std::runtime_error("Class \"HybridConsentSDKSpec\" is not implemented in Swift!");
90
90
  }
91
- #endif
91
+ #endif
92
92
  NitroSecuritiConsentSdk::HybridConsentSDKSpec_cxx& swiftPart = swiftWrapper->getSwiftPart();
93
93
  return swiftPart.toUnsafe();
94
94
  }
@@ -38,8 +38,8 @@ namespace margelo::nitro::securiticonsentsdk { struct PermissionConsent; }
38
38
  #include <optional>
39
39
  #include <functional>
40
40
  #include <NitroModules/Promise.hpp>
41
- #include <vector>
42
41
  #include "AppPermission.hpp"
42
+ #include <vector>
43
43
  #include "Purpose.hpp"
44
44
  #include "SDK.hpp"
45
45
  #include "BannerConfig.hpp"
@@ -78,10 +78,12 @@ namespace margelo::nitro::securiticonsentsdk {
78
78
  }
79
79
 
80
80
  public:
81
- // Get memory pressure
82
81
  inline size_t getExternalMemorySize() noexcept override {
83
82
  return _swiftPart.getMemorySize();
84
83
  }
84
+ void dispose() noexcept override {
85
+ _swiftPart.dispose();
86
+ }
85
87
 
86
88
  public:
87
89
  // Properties
@@ -7,6 +7,7 @@
7
7
 
8
8
  import NitroModules
9
9
 
10
+
10
11
  /**
11
12
  * Wraps a Swift `(_ value: Bool) -> Void` as a class.
12
13
  * This class can be used from C++, e.g. to wrap the Swift closure as a `std::function`.
@@ -7,6 +7,7 @@
7
7
 
8
8
  import NitroModules
9
9
 
10
+
10
11
  /**
11
12
  * Wraps a Swift `(_ error: Error) -> Void` as a class.
12
13
  * This class can be used from C++, e.g. to wrap the Swift closure as a `std::function`.
@@ -7,6 +7,7 @@
7
7
 
8
8
  import NitroModules
9
9
 
10
+
10
11
  /**
11
12
  * Wraps a Swift `(_ value: BannerConfig?) -> Void` as a class.
12
13
  * This class can be used from C++, e.g. to wrap the Swift closure as a `std::function`.
@@ -7,6 +7,7 @@
7
7
 
8
8
  import NitroModules
9
9
 
10
+
10
11
  /**
11
12
  * Wraps a Swift `(_ value: SettingsPrompt?) -> Void` as a class.
12
13
  * This class can be used from C++, e.g. to wrap the Swift closure as a `std::function`.
@@ -7,6 +7,7 @@
7
7
 
8
8
  import NitroModules
9
9
 
10
+
10
11
  /**
11
12
  * Wraps a Swift `(_ value: String) -> Void` as a class.
12
13
  * This class can be used from C++, e.g. to wrap the Swift closure as a `std::function`.
@@ -7,6 +7,7 @@
7
7
 
8
8
  import NitroModules
9
9
 
10
+
10
11
  /**
11
12
  * Wraps a Swift `(_ value: [AppPermission]) -> Void` as a class.
12
13
  * This class can be used from C++, e.g. to wrap the Swift closure as a `std::function`.
@@ -7,6 +7,7 @@
7
7
 
8
8
  import NitroModules
9
9
 
10
+
10
11
  /**
11
12
  * Wraps a Swift `(_ value: [Purpose]) -> Void` as a class.
12
13
  * This class can be used from C++, e.g. to wrap the Swift closure as a `std::function`.
@@ -7,6 +7,7 @@
7
7
 
8
8
  import NitroModules
9
9
 
10
+
10
11
  /**
11
12
  * Wraps a Swift `(_ value: [SDK]) -> Void` as a class.
12
13
  * This class can be used from C++, e.g. to wrap the Swift closure as a `std::function`.
@@ -34,8 +34,9 @@ public protocol HybridConsentSDKSpec_protocol: HybridObject {
34
34
  }
35
35
 
36
36
  /// See ``HybridConsentSDKSpec``
37
- public class HybridConsentSDKSpec_base {
37
+ open class HybridConsentSDKSpec_base {
38
38
  private weak var cxxWrapper: HybridConsentSDKSpec_cxx? = nil
39
+ public init() { }
39
40
  public func getCxxWrapper() -> HybridConsentSDKSpec_cxx {
40
41
  #if DEBUG
41
42
  guard self is HybridConsentSDKSpec else {
@@ -17,7 +17,7 @@ import NitroModules
17
17
  * - Other HybridObjects need to be wrapped/unwrapped from the Swift TCxx wrapper
18
18
  * - Throwing methods need to be wrapped with a Result<T, Error> type, as exceptions cannot be propagated to C++
19
19
  */
20
- public class HybridConsentSDKSpec_cxx {
20
+ open class HybridConsentSDKSpec_cxx {
21
21
  /**
22
22
  * The Swift <> C++ bridge's namespace (`margelo::nitro::securiticonsentsdk::bridge::swift`)
23
23
  * from `NitroSecuritiConsentSdk-Swift-Cxx-Bridge.hpp`.
@@ -96,6 +96,15 @@ public class HybridConsentSDKSpec_cxx {
96
96
  return MemoryHelper.getSizeOf(self.__implementation) + self.__implementation.memorySize
97
97
  }
98
98
 
99
+ /**
100
+ * Call dispose() on the Swift class.
101
+ * This _may_ be called manually from JS.
102
+ */
103
+ @inline(__always)
104
+ public func dispose() {
105
+ self.__implementation.dispose()
106
+ }
107
+
99
108
  // Properties
100
109
 
101
110
 
@@ -20,8 +20,8 @@
20
20
 
21
21
 
22
22
 
23
- #include <optional>
24
23
  #include <string>
24
+ #include <optional>
25
25
 
26
26
  namespace margelo::nitro::securiticonsentsdk {
27
27
 
@@ -30,14 +30,14 @@ namespace margelo::nitro::securiticonsentsdk { struct PostConsentsRequest; }
30
30
 
31
31
  #include "CmpSDKOptions.hpp"
32
32
  #include <functional>
33
- #include <NitroModules/Promise.hpp>
34
33
  #include <string>
35
- #include <vector>
34
+ #include <NitroModules/Promise.hpp>
36
35
  #include "AppPermission.hpp"
36
+ #include <vector>
37
37
  #include "Purpose.hpp"
38
38
  #include "SDK.hpp"
39
- #include <optional>
40
39
  #include "BannerConfig.hpp"
40
+ #include <optional>
41
41
  #include "SettingsPrompt.hpp"
42
42
  #include "PostConsentsRequest.hpp"
43
43
 
@@ -24,8 +24,8 @@ namespace margelo::nitro::securiticonsentsdk { struct PurposeConsent; }
24
24
  namespace margelo::nitro::securiticonsentsdk { struct PermissionConsent; }
25
25
 
26
26
  #include <string>
27
- #include <vector>
28
27
  #include "PurposeConsent.hpp"
28
+ #include <vector>
29
29
  #include "PermissionConsent.hpp"
30
30
  #include <optional>
31
31
 
@@ -23,8 +23,8 @@ namespace margelo::nitro::securiticonsentsdk { struct SDK; }
23
23
 
24
24
  #include <optional>
25
25
  #include <string>
26
- #include <vector>
27
26
  #include "SDK.hpp"
27
+ #include <vector>
28
28
 
29
29
  namespace margelo::nitro::securiticonsentsdk {
30
30
 
@@ -20,8 +20,8 @@
20
20
 
21
21
 
22
22
 
23
- #include <optional>
24
23
  #include <string>
24
+ #include <optional>
25
25
  #include <vector>
26
26
 
27
27
  namespace margelo::nitro::securiticonsentsdk {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "securiti-consent-sdk",
3
- "version": "1.135.0-9rc",
3
+ "version": "1.135.0",
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",