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.
- package/NitroSecuritiConsentSdk.podspec +1 -1
- package/android/build.gradle +1 -1
- package/lib/index.d.ts +20 -0
- package/nitrogen/generated/android/c++/JHybridConsentSDKSpec.cpp +7 -2
- package/nitrogen/generated/android/c++/JHybridConsentSDKSpec.hpp +1 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/securiticonsentsdk/AppPermission.kt +1 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/securiticonsentsdk/BannerConfig.kt +1 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/securiticonsentsdk/CmpSDKOptions.kt +1 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/securiticonsentsdk/CustomColors.kt +1 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/securiticonsentsdk/Func_void_bool.kt +1 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/securiticonsentsdk/PermissionConsent.kt +1 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/securiticonsentsdk/PostConsentsRequest.kt +1 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/securiticonsentsdk/Purpose.kt +1 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/securiticonsentsdk/PurposeConsent.kt +1 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/securiticonsentsdk/SDK.kt +1 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/securiticonsentsdk/SettingsPrompt.kt +1 -0
- package/nitrogen/generated/ios/NitroSecuritiConsentSdk-Swift-Cxx-Bridge.cpp +2 -2
- package/nitrogen/generated/ios/c++/HybridConsentSDKSpecSwift.hpp +4 -2
- package/nitrogen/generated/ios/swift/Func_void_bool.swift +1 -0
- package/nitrogen/generated/ios/swift/Func_void_std__exception_ptr.swift +1 -0
- package/nitrogen/generated/ios/swift/Func_void_std__optional_BannerConfig_.swift +1 -0
- package/nitrogen/generated/ios/swift/Func_void_std__optional_SettingsPrompt_.swift +1 -0
- package/nitrogen/generated/ios/swift/Func_void_std__string.swift +1 -0
- package/nitrogen/generated/ios/swift/Func_void_std__vector_AppPermission_.swift +1 -0
- package/nitrogen/generated/ios/swift/Func_void_std__vector_Purpose_.swift +1 -0
- package/nitrogen/generated/ios/swift/Func_void_std__vector_SDK_.swift +1 -0
- package/nitrogen/generated/ios/swift/HybridConsentSDKSpec.swift +2 -1
- package/nitrogen/generated/ios/swift/HybridConsentSDKSpec_cxx.swift +10 -1
- package/nitrogen/generated/shared/c++/CustomColors.hpp +1 -1
- package/nitrogen/generated/shared/c++/HybridConsentSDKSpec.hpp +3 -3
- package/nitrogen/generated/shared/c++/PostConsentsRequest.hpp +1 -1
- package/nitrogen/generated/shared/c++/Purpose.hpp +1 -1
- package/nitrogen/generated/shared/c++/SettingsPrompt.hpp +1 -1
- package/package.json +1 -1
package/android/build.gradle
CHANGED
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 {
|
package/nitrogen/generated/android/kotlin/com/margelo/nitro/securiticonsentsdk/Func_void_bool.kt
CHANGED
|
@@ -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),
|
|
@@ -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
|
-
|
|
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
|
-
|
|
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
|
|
@@ -34,8 +34,9 @@ public protocol HybridConsentSDKSpec_protocol: HybridObject {
|
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
/// See ``HybridConsentSDKSpec``
|
|
37
|
-
|
|
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
|
-
|
|
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
|
|
|
@@ -30,14 +30,14 @@ namespace margelo::nitro::securiticonsentsdk { struct PostConsentsRequest; }
|
|
|
30
30
|
|
|
31
31
|
#include "CmpSDKOptions.hpp"
|
|
32
32
|
#include <functional>
|
|
33
|
-
#include <NitroModules/Promise.hpp>
|
|
34
33
|
#include <string>
|
|
35
|
-
#include <
|
|
34
|
+
#include <NitroModules/Promise.hpp>
|
|
36
35
|
#include "AppPermission.hpp"
|
|
36
|
+
#include <vector>
|
|
37
37
|
#include "Purpose.hpp"
|
|
38
38
|
#include "SDK.hpp"
|
|
39
|
-
#include <optional>
|
|
40
39
|
#include "BannerConfig.hpp"
|
|
40
|
+
#include <optional>
|
|
41
41
|
#include "SettingsPrompt.hpp"
|
|
42
42
|
#include "PostConsentsRequest.hpp"
|
|
43
43
|
|
|
@@ -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
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "securiti-consent-sdk",
|
|
3
|
-
"version": "1.135.0
|
|
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",
|