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.
- package/NitroSecuritiConsentSdk.podspec +37 -0
- package/README.md +45 -0
- package/android/CMakeLists.txt +29 -0
- package/android/build.gradle +146 -0
- package/android/gradle.properties +5 -0
- package/android/src/main/AndroidManifest.xml +2 -0
- package/android/src/main/cpp/cpp-adapter.cpp +6 -0
- package/android/src/main/java/com/margelo/nitro/securiticonsentsdk/HybridConsentSDK.kt +669 -0
- package/android/src/main/java/com/margelo/nitro/securiticonsentsdk/NitroSecuritiConsentSdkPackage.java +33 -0
- package/ios/Bridge.h +10 -0
- package/ios/HybridConsentSDK.swift +640 -0
- package/nitrogen/generated/.gitattributes +1 -0
- package/nitrogen/generated/android/NitroSecuritiConsentSdk+autolinking.cmake +78 -0
- package/nitrogen/generated/android/NitroSecuritiConsentSdk+autolinking.gradle +27 -0
- package/nitrogen/generated/android/NitroSecuritiConsentSdkOnLoad.cpp +48 -0
- package/nitrogen/generated/android/NitroSecuritiConsentSdkOnLoad.hpp +25 -0
- package/nitrogen/generated/android/c++/JAppPermission.hpp +86 -0
- package/nitrogen/generated/android/c++/JBannerConfig.hpp +194 -0
- package/nitrogen/generated/android/c++/JCmpSDKOptions.hpp +94 -0
- package/nitrogen/generated/android/c++/JCustomColors.hpp +82 -0
- package/nitrogen/generated/android/c++/JFunc_void_bool.hpp +74 -0
- package/nitrogen/generated/android/c++/JHybridConsentSDKSpec.cpp +277 -0
- package/nitrogen/generated/android/c++/JHybridConsentSDKSpec.hpp +78 -0
- package/nitrogen/generated/android/c++/JPermissionConsent.hpp +61 -0
- package/nitrogen/generated/android/c++/JPostConsentsRequest.hpp +137 -0
- package/nitrogen/generated/android/c++/JPurpose.hpp +118 -0
- package/nitrogen/generated/android/c++/JPurposeConsent.hpp +65 -0
- package/nitrogen/generated/android/c++/JSDK.hpp +104 -0
- package/nitrogen/generated/android/c++/JSettingsPrompt.hpp +88 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/securiticonsentsdk/AppPermission.kt +34 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/securiticonsentsdk/BannerConfig.kt +57 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/securiticonsentsdk/CmpSDKOptions.kt +36 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/securiticonsentsdk/CustomColors.kt +33 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/securiticonsentsdk/Func_void_bool.kt +80 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/securiticonsentsdk/HybridConsentSDKSpec.kt +121 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/securiticonsentsdk/NitroSecuritiConsentSdkOnLoad.kt +35 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/securiticonsentsdk/PermissionConsent.kt +28 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/securiticonsentsdk/PostConsentsRequest.kt +37 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/securiticonsentsdk/Purpose.kt +37 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/securiticonsentsdk/PurposeConsent.kt +29 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/securiticonsentsdk/SDK.kt +34 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/securiticonsentsdk/SettingsPrompt.kt +30 -0
- package/nitrogen/generated/ios/NitroSecuritiConsentSdk+autolinking.rb +60 -0
- package/nitrogen/generated/ios/NitroSecuritiConsentSdk-Swift-Cxx-Bridge.cpp +96 -0
- package/nitrogen/generated/ios/NitroSecuritiConsentSdk-Swift-Cxx-Bridge.hpp +604 -0
- package/nitrogen/generated/ios/NitroSecuritiConsentSdk-Swift-Cxx-Umbrella.hpp +78 -0
- package/nitrogen/generated/ios/NitroSecuritiConsentSdkAutolinking.mm +33 -0
- package/nitrogen/generated/ios/NitroSecuritiConsentSdkAutolinking.swift +25 -0
- package/nitrogen/generated/ios/c++/HybridConsentSDKSpecSwift.cpp +11 -0
- package/nitrogen/generated/ios/c++/HybridConsentSDKSpecSwift.hpp +223 -0
- package/nitrogen/generated/ios/swift/AppPermission.swift +267 -0
- package/nitrogen/generated/ios/swift/BannerConfig.swift +918 -0
- package/nitrogen/generated/ios/swift/CmpSDKOptions.swift +217 -0
- package/nitrogen/generated/ios/swift/CustomColors.swift +256 -0
- package/nitrogen/generated/ios/swift/Func_void_bool.swift +46 -0
- package/nitrogen/generated/ios/swift/Func_void_std__exception_ptr.swift +46 -0
- package/nitrogen/generated/ios/swift/Func_void_std__optional_BannerConfig_.swift +52 -0
- package/nitrogen/generated/ios/swift/Func_void_std__optional_SettingsPrompt_.swift +52 -0
- package/nitrogen/generated/ios/swift/Func_void_std__string.swift +46 -0
- package/nitrogen/generated/ios/swift/Func_void_std__vector_AppPermission_.swift +46 -0
- package/nitrogen/generated/ios/swift/Func_void_std__vector_Purpose_.swift +46 -0
- package/nitrogen/generated/ios/swift/Func_void_std__vector_SDK_.swift +46 -0
- package/nitrogen/generated/ios/swift/HybridConsentSDKSpec.swift +64 -0
- package/nitrogen/generated/ios/swift/HybridConsentSDKSpec_cxx.swift +398 -0
- package/nitrogen/generated/ios/swift/PermissionConsent.swift +57 -0
- package/nitrogen/generated/ios/swift/PostConsentsRequest.swift +216 -0
- package/nitrogen/generated/ios/swift/Purpose.swift +354 -0
- package/nitrogen/generated/ios/swift/PurposeConsent.swift +68 -0
- package/nitrogen/generated/ios/swift/SDK.swift +285 -0
- package/nitrogen/generated/ios/swift/SettingsPrompt.swift +181 -0
- package/nitrogen/generated/shared/c++/AppPermission.hpp +102 -0
- package/nitrogen/generated/shared/c++/BannerConfig.hpp +197 -0
- package/nitrogen/generated/shared/c++/CmpSDKOptions.hpp +110 -0
- package/nitrogen/generated/shared/c++/CustomColors.hpp +98 -0
- package/nitrogen/generated/shared/c++/HybridConsentSDKSpec.cpp +37 -0
- package/nitrogen/generated/shared/c++/HybridConsentSDKSpec.hpp +102 -0
- package/nitrogen/generated/shared/c++/PermissionConsent.hpp +77 -0
- package/nitrogen/generated/shared/c++/PostConsentsRequest.hpp +120 -0
- package/nitrogen/generated/shared/c++/Purpose.hpp +117 -0
- package/nitrogen/generated/shared/c++/PurposeConsent.hpp +81 -0
- package/nitrogen/generated/shared/c++/SDK.hpp +103 -0
- package/nitrogen/generated/shared/c++/SettingsPrompt.hpp +87 -0
- package/package.json +107 -0
- package/react-native.config.js +16 -0
- package/src/ConsentSDK.nitro.ts +232 -0
- package/src/index.ts +133 -0
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// PostConsentsRequest.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
|
+
#if __has_include(<NitroModules/JSIConverter.hpp>)
|
|
11
|
+
#include <NitroModules/JSIConverter.hpp>
|
|
12
|
+
#else
|
|
13
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
14
|
+
#endif
|
|
15
|
+
#if __has_include(<NitroModules/NitroDefines.hpp>)
|
|
16
|
+
#include <NitroModules/NitroDefines.hpp>
|
|
17
|
+
#else
|
|
18
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
19
|
+
#endif
|
|
20
|
+
|
|
21
|
+
// Forward declaration of `PurposeConsent` to properly resolve imports.
|
|
22
|
+
namespace margelo::nitro::securiticonsentsdk { struct PurposeConsent; }
|
|
23
|
+
// Forward declaration of `PermissionConsent` to properly resolve imports.
|
|
24
|
+
namespace margelo::nitro::securiticonsentsdk { struct PermissionConsent; }
|
|
25
|
+
|
|
26
|
+
#include <string>
|
|
27
|
+
#include <vector>
|
|
28
|
+
#include "PurposeConsent.hpp"
|
|
29
|
+
#include "PermissionConsent.hpp"
|
|
30
|
+
#include <optional>
|
|
31
|
+
|
|
32
|
+
namespace margelo::nitro::securiticonsentsdk {
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* A struct which can be represented as a JavaScript object (PostConsentsRequest).
|
|
36
|
+
*/
|
|
37
|
+
struct PostConsentsRequest {
|
|
38
|
+
public:
|
|
39
|
+
std::string uuid SWIFT_PRIVATE;
|
|
40
|
+
std::string appUUID SWIFT_PRIVATE;
|
|
41
|
+
std::string device SWIFT_PRIVATE;
|
|
42
|
+
bool implicitConsent SWIFT_PRIVATE;
|
|
43
|
+
double version SWIFT_PRIVATE;
|
|
44
|
+
std::vector<PurposeConsent> purposeConsents SWIFT_PRIVATE;
|
|
45
|
+
std::vector<PermissionConsent> permissions SWIFT_PRIVATE;
|
|
46
|
+
bool isTestMode SWIFT_PRIVATE;
|
|
47
|
+
std::string adId SWIFT_PRIVATE;
|
|
48
|
+
std::string bannerInfo SWIFT_PRIVATE;
|
|
49
|
+
std::optional<std::string> sdkVersion SWIFT_PRIVATE;
|
|
50
|
+
std::optional<std::string> platform SWIFT_PRIVATE;
|
|
51
|
+
|
|
52
|
+
public:
|
|
53
|
+
PostConsentsRequest() = default;
|
|
54
|
+
explicit PostConsentsRequest(std::string uuid, std::string appUUID, std::string device, bool implicitConsent, double version, std::vector<PurposeConsent> purposeConsents, std::vector<PermissionConsent> permissions, bool isTestMode, std::string adId, std::string bannerInfo, std::optional<std::string> sdkVersion, std::optional<std::string> platform): uuid(uuid), appUUID(appUUID), device(device), implicitConsent(implicitConsent), version(version), purposeConsents(purposeConsents), permissions(permissions), isTestMode(isTestMode), adId(adId), bannerInfo(bannerInfo), sdkVersion(sdkVersion), platform(platform) {}
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
} // namespace margelo::nitro::securiticonsentsdk
|
|
58
|
+
|
|
59
|
+
namespace margelo::nitro {
|
|
60
|
+
|
|
61
|
+
using namespace margelo::nitro::securiticonsentsdk;
|
|
62
|
+
|
|
63
|
+
// C++ PostConsentsRequest <> JS PostConsentsRequest (object)
|
|
64
|
+
template <>
|
|
65
|
+
struct JSIConverter<PostConsentsRequest> final {
|
|
66
|
+
static inline PostConsentsRequest fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
67
|
+
jsi::Object obj = arg.asObject(runtime);
|
|
68
|
+
return PostConsentsRequest(
|
|
69
|
+
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "uuid")),
|
|
70
|
+
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "appUUID")),
|
|
71
|
+
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "device")),
|
|
72
|
+
JSIConverter<bool>::fromJSI(runtime, obj.getProperty(runtime, "implicitConsent")),
|
|
73
|
+
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")),
|
|
76
|
+
JSIConverter<bool>::fromJSI(runtime, obj.getProperty(runtime, "isTestMode")),
|
|
77
|
+
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "adId")),
|
|
78
|
+
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "bannerInfo")),
|
|
79
|
+
JSIConverter<std::optional<std::string>>::fromJSI(runtime, obj.getProperty(runtime, "sdkVersion")),
|
|
80
|
+
JSIConverter<std::optional<std::string>>::fromJSI(runtime, obj.getProperty(runtime, "platform"))
|
|
81
|
+
);
|
|
82
|
+
}
|
|
83
|
+
static inline jsi::Value toJSI(jsi::Runtime& runtime, const PostConsentsRequest& arg) {
|
|
84
|
+
jsi::Object obj(runtime);
|
|
85
|
+
obj.setProperty(runtime, "uuid", JSIConverter<std::string>::toJSI(runtime, arg.uuid));
|
|
86
|
+
obj.setProperty(runtime, "appUUID", JSIConverter<std::string>::toJSI(runtime, arg.appUUID));
|
|
87
|
+
obj.setProperty(runtime, "device", JSIConverter<std::string>::toJSI(runtime, arg.device));
|
|
88
|
+
obj.setProperty(runtime, "implicitConsent", JSIConverter<bool>::toJSI(runtime, arg.implicitConsent));
|
|
89
|
+
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));
|
|
92
|
+
obj.setProperty(runtime, "isTestMode", JSIConverter<bool>::toJSI(runtime, arg.isTestMode));
|
|
93
|
+
obj.setProperty(runtime, "adId", JSIConverter<std::string>::toJSI(runtime, arg.adId));
|
|
94
|
+
obj.setProperty(runtime, "bannerInfo", JSIConverter<std::string>::toJSI(runtime, arg.bannerInfo));
|
|
95
|
+
obj.setProperty(runtime, "sdkVersion", JSIConverter<std::optional<std::string>>::toJSI(runtime, arg.sdkVersion));
|
|
96
|
+
obj.setProperty(runtime, "platform", JSIConverter<std::optional<std::string>>::toJSI(runtime, arg.platform));
|
|
97
|
+
return obj;
|
|
98
|
+
}
|
|
99
|
+
static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
|
|
100
|
+
if (!value.isObject()) {
|
|
101
|
+
return false;
|
|
102
|
+
}
|
|
103
|
+
jsi::Object obj = value.getObject(runtime);
|
|
104
|
+
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "uuid"))) return false;
|
|
105
|
+
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "appUUID"))) return false;
|
|
106
|
+
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "device"))) return false;
|
|
107
|
+
if (!JSIConverter<bool>::canConvert(runtime, obj.getProperty(runtime, "implicitConsent"))) return false;
|
|
108
|
+
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;
|
|
111
|
+
if (!JSIConverter<bool>::canConvert(runtime, obj.getProperty(runtime, "isTestMode"))) return false;
|
|
112
|
+
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "adId"))) return false;
|
|
113
|
+
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "bannerInfo"))) return false;
|
|
114
|
+
if (!JSIConverter<std::optional<std::string>>::canConvert(runtime, obj.getProperty(runtime, "sdkVersion"))) return false;
|
|
115
|
+
if (!JSIConverter<std::optional<std::string>>::canConvert(runtime, obj.getProperty(runtime, "platform"))) return false;
|
|
116
|
+
return true;
|
|
117
|
+
}
|
|
118
|
+
};
|
|
119
|
+
|
|
120
|
+
} // namespace margelo::nitro
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// Purpose.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
|
+
#if __has_include(<NitroModules/JSIConverter.hpp>)
|
|
11
|
+
#include <NitroModules/JSIConverter.hpp>
|
|
12
|
+
#else
|
|
13
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
14
|
+
#endif
|
|
15
|
+
#if __has_include(<NitroModules/NitroDefines.hpp>)
|
|
16
|
+
#include <NitroModules/NitroDefines.hpp>
|
|
17
|
+
#else
|
|
18
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
19
|
+
#endif
|
|
20
|
+
|
|
21
|
+
// Forward declaration of `SDK` to properly resolve imports.
|
|
22
|
+
namespace margelo::nitro::securiticonsentsdk { struct SDK; }
|
|
23
|
+
|
|
24
|
+
#include <optional>
|
|
25
|
+
#include <string>
|
|
26
|
+
#include <vector>
|
|
27
|
+
#include "SDK.hpp"
|
|
28
|
+
|
|
29
|
+
namespace margelo::nitro::securiticonsentsdk {
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* A struct which can be represented as a JavaScript object (Purpose).
|
|
33
|
+
*/
|
|
34
|
+
struct Purpose {
|
|
35
|
+
public:
|
|
36
|
+
std::optional<double> purposeId SWIFT_PRIVATE;
|
|
37
|
+
std::optional<std::string> purposeName SWIFT_PRIVATE;
|
|
38
|
+
std::optional<std::string> purposeDescription SWIFT_PRIVATE;
|
|
39
|
+
std::optional<std::vector<SDK>> sdks SWIFT_PRIVATE;
|
|
40
|
+
std::optional<std::string> consentStatus SWIFT_PRIVATE;
|
|
41
|
+
std::optional<bool> disableOptOut SWIFT_PRIVATE;
|
|
42
|
+
std::optional<std::string> optOutText SWIFT_PRIVATE;
|
|
43
|
+
std::optional<bool> hideDetails SWIFT_PRIVATE;
|
|
44
|
+
std::optional<bool> isGADMapped SWIFT_PRIVATE;
|
|
45
|
+
std::optional<std::string> gadDescription SWIFT_PRIVATE;
|
|
46
|
+
std::optional<bool> isATTMapped SWIFT_PRIVATE;
|
|
47
|
+
std::optional<std::string> attDescription SWIFT_PRIVATE;
|
|
48
|
+
|
|
49
|
+
public:
|
|
50
|
+
Purpose() = default;
|
|
51
|
+
explicit Purpose(std::optional<double> purposeId, std::optional<std::string> purposeName, std::optional<std::string> purposeDescription, std::optional<std::vector<SDK>> sdks, std::optional<std::string> consentStatus, std::optional<bool> disableOptOut, std::optional<std::string> optOutText, std::optional<bool> hideDetails, std::optional<bool> isGADMapped, std::optional<std::string> gadDescription, std::optional<bool> isATTMapped, std::optional<std::string> attDescription): purposeId(purposeId), purposeName(purposeName), purposeDescription(purposeDescription), sdks(sdks), consentStatus(consentStatus), disableOptOut(disableOptOut), optOutText(optOutText), hideDetails(hideDetails), isGADMapped(isGADMapped), gadDescription(gadDescription), isATTMapped(isATTMapped), attDescription(attDescription) {}
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
} // namespace margelo::nitro::securiticonsentsdk
|
|
55
|
+
|
|
56
|
+
namespace margelo::nitro {
|
|
57
|
+
|
|
58
|
+
using namespace margelo::nitro::securiticonsentsdk;
|
|
59
|
+
|
|
60
|
+
// C++ Purpose <> JS Purpose (object)
|
|
61
|
+
template <>
|
|
62
|
+
struct JSIConverter<Purpose> final {
|
|
63
|
+
static inline Purpose fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
64
|
+
jsi::Object obj = arg.asObject(runtime);
|
|
65
|
+
return Purpose(
|
|
66
|
+
JSIConverter<std::optional<double>>::fromJSI(runtime, obj.getProperty(runtime, "purposeId")),
|
|
67
|
+
JSIConverter<std::optional<std::string>>::fromJSI(runtime, obj.getProperty(runtime, "purposeName")),
|
|
68
|
+
JSIConverter<std::optional<std::string>>::fromJSI(runtime, obj.getProperty(runtime, "purposeDescription")),
|
|
69
|
+
JSIConverter<std::optional<std::vector<SDK>>>::fromJSI(runtime, obj.getProperty(runtime, "sdks")),
|
|
70
|
+
JSIConverter<std::optional<std::string>>::fromJSI(runtime, obj.getProperty(runtime, "consentStatus")),
|
|
71
|
+
JSIConverter<std::optional<bool>>::fromJSI(runtime, obj.getProperty(runtime, "disableOptOut")),
|
|
72
|
+
JSIConverter<std::optional<std::string>>::fromJSI(runtime, obj.getProperty(runtime, "optOutText")),
|
|
73
|
+
JSIConverter<std::optional<bool>>::fromJSI(runtime, obj.getProperty(runtime, "hideDetails")),
|
|
74
|
+
JSIConverter<std::optional<bool>>::fromJSI(runtime, obj.getProperty(runtime, "isGADMapped")),
|
|
75
|
+
JSIConverter<std::optional<std::string>>::fromJSI(runtime, obj.getProperty(runtime, "gadDescription")),
|
|
76
|
+
JSIConverter<std::optional<bool>>::fromJSI(runtime, obj.getProperty(runtime, "isATTMapped")),
|
|
77
|
+
JSIConverter<std::optional<std::string>>::fromJSI(runtime, obj.getProperty(runtime, "attDescription"))
|
|
78
|
+
);
|
|
79
|
+
}
|
|
80
|
+
static inline jsi::Value toJSI(jsi::Runtime& runtime, const Purpose& arg) {
|
|
81
|
+
jsi::Object obj(runtime);
|
|
82
|
+
obj.setProperty(runtime, "purposeId", JSIConverter<std::optional<double>>::toJSI(runtime, arg.purposeId));
|
|
83
|
+
obj.setProperty(runtime, "purposeName", JSIConverter<std::optional<std::string>>::toJSI(runtime, arg.purposeName));
|
|
84
|
+
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));
|
|
86
|
+
obj.setProperty(runtime, "consentStatus", JSIConverter<std::optional<std::string>>::toJSI(runtime, arg.consentStatus));
|
|
87
|
+
obj.setProperty(runtime, "disableOptOut", JSIConverter<std::optional<bool>>::toJSI(runtime, arg.disableOptOut));
|
|
88
|
+
obj.setProperty(runtime, "optOutText", JSIConverter<std::optional<std::string>>::toJSI(runtime, arg.optOutText));
|
|
89
|
+
obj.setProperty(runtime, "hideDetails", JSIConverter<std::optional<bool>>::toJSI(runtime, arg.hideDetails));
|
|
90
|
+
obj.setProperty(runtime, "isGADMapped", JSIConverter<std::optional<bool>>::toJSI(runtime, arg.isGADMapped));
|
|
91
|
+
obj.setProperty(runtime, "gadDescription", JSIConverter<std::optional<std::string>>::toJSI(runtime, arg.gadDescription));
|
|
92
|
+
obj.setProperty(runtime, "isATTMapped", JSIConverter<std::optional<bool>>::toJSI(runtime, arg.isATTMapped));
|
|
93
|
+
obj.setProperty(runtime, "attDescription", JSIConverter<std::optional<std::string>>::toJSI(runtime, arg.attDescription));
|
|
94
|
+
return obj;
|
|
95
|
+
}
|
|
96
|
+
static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
|
|
97
|
+
if (!value.isObject()) {
|
|
98
|
+
return false;
|
|
99
|
+
}
|
|
100
|
+
jsi::Object obj = value.getObject(runtime);
|
|
101
|
+
if (!JSIConverter<std::optional<double>>::canConvert(runtime, obj.getProperty(runtime, "purposeId"))) return false;
|
|
102
|
+
if (!JSIConverter<std::optional<std::string>>::canConvert(runtime, obj.getProperty(runtime, "purposeName"))) return false;
|
|
103
|
+
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;
|
|
105
|
+
if (!JSIConverter<std::optional<std::string>>::canConvert(runtime, obj.getProperty(runtime, "consentStatus"))) return false;
|
|
106
|
+
if (!JSIConverter<std::optional<bool>>::canConvert(runtime, obj.getProperty(runtime, "disableOptOut"))) return false;
|
|
107
|
+
if (!JSIConverter<std::optional<std::string>>::canConvert(runtime, obj.getProperty(runtime, "optOutText"))) return false;
|
|
108
|
+
if (!JSIConverter<std::optional<bool>>::canConvert(runtime, obj.getProperty(runtime, "hideDetails"))) return false;
|
|
109
|
+
if (!JSIConverter<std::optional<bool>>::canConvert(runtime, obj.getProperty(runtime, "isGADMapped"))) return false;
|
|
110
|
+
if (!JSIConverter<std::optional<std::string>>::canConvert(runtime, obj.getProperty(runtime, "gadDescription"))) return false;
|
|
111
|
+
if (!JSIConverter<std::optional<bool>>::canConvert(runtime, obj.getProperty(runtime, "isATTMapped"))) return false;
|
|
112
|
+
if (!JSIConverter<std::optional<std::string>>::canConvert(runtime, obj.getProperty(runtime, "attDescription"))) return false;
|
|
113
|
+
return true;
|
|
114
|
+
}
|
|
115
|
+
};
|
|
116
|
+
|
|
117
|
+
} // namespace margelo::nitro
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// PurposeConsent.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
|
+
#if __has_include(<NitroModules/JSIConverter.hpp>)
|
|
11
|
+
#include <NitroModules/JSIConverter.hpp>
|
|
12
|
+
#else
|
|
13
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
14
|
+
#endif
|
|
15
|
+
#if __has_include(<NitroModules/NitroDefines.hpp>)
|
|
16
|
+
#include <NitroModules/NitroDefines.hpp>
|
|
17
|
+
#else
|
|
18
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
19
|
+
#endif
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
#include <string>
|
|
24
|
+
|
|
25
|
+
namespace margelo::nitro::securiticonsentsdk {
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* A struct which can be represented as a JavaScript object (PurposeConsent).
|
|
29
|
+
*/
|
|
30
|
+
struct PurposeConsent {
|
|
31
|
+
public:
|
|
32
|
+
double purposeID SWIFT_PRIVATE;
|
|
33
|
+
std::string consentStatus SWIFT_PRIVATE;
|
|
34
|
+
double timestamp SWIFT_PRIVATE;
|
|
35
|
+
bool isEssential SWIFT_PRIVATE;
|
|
36
|
+
|
|
37
|
+
public:
|
|
38
|
+
PurposeConsent() = default;
|
|
39
|
+
explicit PurposeConsent(double purposeID, std::string consentStatus, double timestamp, bool isEssential): purposeID(purposeID), consentStatus(consentStatus), timestamp(timestamp), isEssential(isEssential) {}
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
} // namespace margelo::nitro::securiticonsentsdk
|
|
43
|
+
|
|
44
|
+
namespace margelo::nitro {
|
|
45
|
+
|
|
46
|
+
using namespace margelo::nitro::securiticonsentsdk;
|
|
47
|
+
|
|
48
|
+
// C++ PurposeConsent <> JS PurposeConsent (object)
|
|
49
|
+
template <>
|
|
50
|
+
struct JSIConverter<PurposeConsent> final {
|
|
51
|
+
static inline PurposeConsent fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
52
|
+
jsi::Object obj = arg.asObject(runtime);
|
|
53
|
+
return PurposeConsent(
|
|
54
|
+
JSIConverter<double>::fromJSI(runtime, obj.getProperty(runtime, "purposeID")),
|
|
55
|
+
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "consentStatus")),
|
|
56
|
+
JSIConverter<double>::fromJSI(runtime, obj.getProperty(runtime, "timestamp")),
|
|
57
|
+
JSIConverter<bool>::fromJSI(runtime, obj.getProperty(runtime, "isEssential"))
|
|
58
|
+
);
|
|
59
|
+
}
|
|
60
|
+
static inline jsi::Value toJSI(jsi::Runtime& runtime, const PurposeConsent& arg) {
|
|
61
|
+
jsi::Object obj(runtime);
|
|
62
|
+
obj.setProperty(runtime, "purposeID", JSIConverter<double>::toJSI(runtime, arg.purposeID));
|
|
63
|
+
obj.setProperty(runtime, "consentStatus", JSIConverter<std::string>::toJSI(runtime, arg.consentStatus));
|
|
64
|
+
obj.setProperty(runtime, "timestamp", JSIConverter<double>::toJSI(runtime, arg.timestamp));
|
|
65
|
+
obj.setProperty(runtime, "isEssential", JSIConverter<bool>::toJSI(runtime, arg.isEssential));
|
|
66
|
+
return obj;
|
|
67
|
+
}
|
|
68
|
+
static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
|
|
69
|
+
if (!value.isObject()) {
|
|
70
|
+
return false;
|
|
71
|
+
}
|
|
72
|
+
jsi::Object obj = value.getObject(runtime);
|
|
73
|
+
if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, "purposeID"))) return false;
|
|
74
|
+
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "consentStatus"))) return false;
|
|
75
|
+
if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, "timestamp"))) return false;
|
|
76
|
+
if (!JSIConverter<bool>::canConvert(runtime, obj.getProperty(runtime, "isEssential"))) return false;
|
|
77
|
+
return true;
|
|
78
|
+
}
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
} // namespace margelo::nitro
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// SDK.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
|
+
#if __has_include(<NitroModules/JSIConverter.hpp>)
|
|
11
|
+
#include <NitroModules/JSIConverter.hpp>
|
|
12
|
+
#else
|
|
13
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
14
|
+
#endif
|
|
15
|
+
#if __has_include(<NitroModules/NitroDefines.hpp>)
|
|
16
|
+
#include <NitroModules/NitroDefines.hpp>
|
|
17
|
+
#else
|
|
18
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
19
|
+
#endif
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
#include <optional>
|
|
24
|
+
#include <string>
|
|
25
|
+
#include <vector>
|
|
26
|
+
|
|
27
|
+
namespace margelo::nitro::securiticonsentsdk {
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* A struct which can be represented as a JavaScript object (SDK).
|
|
31
|
+
*/
|
|
32
|
+
struct SDK {
|
|
33
|
+
public:
|
|
34
|
+
std::optional<double> sdkId SWIFT_PRIVATE;
|
|
35
|
+
std::optional<std::string> namespaceId SWIFT_PRIVATE;
|
|
36
|
+
std::optional<std::string> sdkName SWIFT_PRIVATE;
|
|
37
|
+
std::optional<std::string> sdkDescription SWIFT_PRIVATE;
|
|
38
|
+
std::optional<std::string> vendor SWIFT_PRIVATE;
|
|
39
|
+
std::optional<std::string> logoBase64 SWIFT_PRIVATE;
|
|
40
|
+
std::optional<std::string> website SWIFT_PRIVATE;
|
|
41
|
+
std::optional<std::vector<std::string>> matchedBy SWIFT_PRIVATE;
|
|
42
|
+
std::optional<bool> collectingData SWIFT_PRIVATE;
|
|
43
|
+
|
|
44
|
+
public:
|
|
45
|
+
SDK() = default;
|
|
46
|
+
explicit SDK(std::optional<double> sdkId, std::optional<std::string> namespaceId, std::optional<std::string> sdkName, std::optional<std::string> sdkDescription, std::optional<std::string> vendor, std::optional<std::string> logoBase64, std::optional<std::string> website, std::optional<std::vector<std::string>> matchedBy, std::optional<bool> collectingData): sdkId(sdkId), namespaceId(namespaceId), sdkName(sdkName), sdkDescription(sdkDescription), vendor(vendor), logoBase64(logoBase64), website(website), matchedBy(matchedBy), collectingData(collectingData) {}
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
} // namespace margelo::nitro::securiticonsentsdk
|
|
50
|
+
|
|
51
|
+
namespace margelo::nitro {
|
|
52
|
+
|
|
53
|
+
using namespace margelo::nitro::securiticonsentsdk;
|
|
54
|
+
|
|
55
|
+
// C++ SDK <> JS SDK (object)
|
|
56
|
+
template <>
|
|
57
|
+
struct JSIConverter<SDK> final {
|
|
58
|
+
static inline SDK fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
59
|
+
jsi::Object obj = arg.asObject(runtime);
|
|
60
|
+
return SDK(
|
|
61
|
+
JSIConverter<std::optional<double>>::fromJSI(runtime, obj.getProperty(runtime, "sdkId")),
|
|
62
|
+
JSIConverter<std::optional<std::string>>::fromJSI(runtime, obj.getProperty(runtime, "namespaceId")),
|
|
63
|
+
JSIConverter<std::optional<std::string>>::fromJSI(runtime, obj.getProperty(runtime, "sdkName")),
|
|
64
|
+
JSIConverter<std::optional<std::string>>::fromJSI(runtime, obj.getProperty(runtime, "sdkDescription")),
|
|
65
|
+
JSIConverter<std::optional<std::string>>::fromJSI(runtime, obj.getProperty(runtime, "vendor")),
|
|
66
|
+
JSIConverter<std::optional<std::string>>::fromJSI(runtime, obj.getProperty(runtime, "logoBase64")),
|
|
67
|
+
JSIConverter<std::optional<std::string>>::fromJSI(runtime, obj.getProperty(runtime, "website")),
|
|
68
|
+
JSIConverter<std::optional<std::vector<std::string>>>::fromJSI(runtime, obj.getProperty(runtime, "matchedBy")),
|
|
69
|
+
JSIConverter<std::optional<bool>>::fromJSI(runtime, obj.getProperty(runtime, "collectingData"))
|
|
70
|
+
);
|
|
71
|
+
}
|
|
72
|
+
static inline jsi::Value toJSI(jsi::Runtime& runtime, const SDK& arg) {
|
|
73
|
+
jsi::Object obj(runtime);
|
|
74
|
+
obj.setProperty(runtime, "sdkId", JSIConverter<std::optional<double>>::toJSI(runtime, arg.sdkId));
|
|
75
|
+
obj.setProperty(runtime, "namespaceId", JSIConverter<std::optional<std::string>>::toJSI(runtime, arg.namespaceId));
|
|
76
|
+
obj.setProperty(runtime, "sdkName", JSIConverter<std::optional<std::string>>::toJSI(runtime, arg.sdkName));
|
|
77
|
+
obj.setProperty(runtime, "sdkDescription", JSIConverter<std::optional<std::string>>::toJSI(runtime, arg.sdkDescription));
|
|
78
|
+
obj.setProperty(runtime, "vendor", JSIConverter<std::optional<std::string>>::toJSI(runtime, arg.vendor));
|
|
79
|
+
obj.setProperty(runtime, "logoBase64", JSIConverter<std::optional<std::string>>::toJSI(runtime, arg.logoBase64));
|
|
80
|
+
obj.setProperty(runtime, "website", JSIConverter<std::optional<std::string>>::toJSI(runtime, arg.website));
|
|
81
|
+
obj.setProperty(runtime, "matchedBy", JSIConverter<std::optional<std::vector<std::string>>>::toJSI(runtime, arg.matchedBy));
|
|
82
|
+
obj.setProperty(runtime, "collectingData", JSIConverter<std::optional<bool>>::toJSI(runtime, arg.collectingData));
|
|
83
|
+
return obj;
|
|
84
|
+
}
|
|
85
|
+
static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
|
|
86
|
+
if (!value.isObject()) {
|
|
87
|
+
return false;
|
|
88
|
+
}
|
|
89
|
+
jsi::Object obj = value.getObject(runtime);
|
|
90
|
+
if (!JSIConverter<std::optional<double>>::canConvert(runtime, obj.getProperty(runtime, "sdkId"))) return false;
|
|
91
|
+
if (!JSIConverter<std::optional<std::string>>::canConvert(runtime, obj.getProperty(runtime, "namespaceId"))) return false;
|
|
92
|
+
if (!JSIConverter<std::optional<std::string>>::canConvert(runtime, obj.getProperty(runtime, "sdkName"))) return false;
|
|
93
|
+
if (!JSIConverter<std::optional<std::string>>::canConvert(runtime, obj.getProperty(runtime, "sdkDescription"))) return false;
|
|
94
|
+
if (!JSIConverter<std::optional<std::string>>::canConvert(runtime, obj.getProperty(runtime, "vendor"))) return false;
|
|
95
|
+
if (!JSIConverter<std::optional<std::string>>::canConvert(runtime, obj.getProperty(runtime, "logoBase64"))) return false;
|
|
96
|
+
if (!JSIConverter<std::optional<std::string>>::canConvert(runtime, obj.getProperty(runtime, "website"))) return false;
|
|
97
|
+
if (!JSIConverter<std::optional<std::vector<std::string>>>::canConvert(runtime, obj.getProperty(runtime, "matchedBy"))) return false;
|
|
98
|
+
if (!JSIConverter<std::optional<bool>>::canConvert(runtime, obj.getProperty(runtime, "collectingData"))) return false;
|
|
99
|
+
return true;
|
|
100
|
+
}
|
|
101
|
+
};
|
|
102
|
+
|
|
103
|
+
} // namespace margelo::nitro
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// SettingsPrompt.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
|
+
#if __has_include(<NitroModules/JSIConverter.hpp>)
|
|
11
|
+
#include <NitroModules/JSIConverter.hpp>
|
|
12
|
+
#else
|
|
13
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
14
|
+
#endif
|
|
15
|
+
#if __has_include(<NitroModules/NitroDefines.hpp>)
|
|
16
|
+
#include <NitroModules/NitroDefines.hpp>
|
|
17
|
+
#else
|
|
18
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
19
|
+
#endif
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
#include <optional>
|
|
24
|
+
#include <string>
|
|
25
|
+
#include <vector>
|
|
26
|
+
|
|
27
|
+
namespace margelo::nitro::securiticonsentsdk {
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* A struct which can be represented as a JavaScript object (SettingsPrompt).
|
|
31
|
+
*/
|
|
32
|
+
struct SettingsPrompt {
|
|
33
|
+
public:
|
|
34
|
+
std::optional<std::string> promptHeading SWIFT_PRIVATE;
|
|
35
|
+
std::optional<std::string> promptMessage SWIFT_PRIVATE;
|
|
36
|
+
std::optional<std::string> settingsButtonText SWIFT_PRIVATE;
|
|
37
|
+
std::optional<std::string> notNowButtonText SWIFT_PRIVATE;
|
|
38
|
+
std::optional<std::vector<std::string>> permissions SWIFT_PRIVATE;
|
|
39
|
+
|
|
40
|
+
public:
|
|
41
|
+
SettingsPrompt() = default;
|
|
42
|
+
explicit SettingsPrompt(std::optional<std::string> promptHeading, std::optional<std::string> promptMessage, std::optional<std::string> settingsButtonText, std::optional<std::string> notNowButtonText, std::optional<std::vector<std::string>> permissions): promptHeading(promptHeading), promptMessage(promptMessage), settingsButtonText(settingsButtonText), notNowButtonText(notNowButtonText), permissions(permissions) {}
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
} // namespace margelo::nitro::securiticonsentsdk
|
|
46
|
+
|
|
47
|
+
namespace margelo::nitro {
|
|
48
|
+
|
|
49
|
+
using namespace margelo::nitro::securiticonsentsdk;
|
|
50
|
+
|
|
51
|
+
// C++ SettingsPrompt <> JS SettingsPrompt (object)
|
|
52
|
+
template <>
|
|
53
|
+
struct JSIConverter<SettingsPrompt> final {
|
|
54
|
+
static inline SettingsPrompt fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
55
|
+
jsi::Object obj = arg.asObject(runtime);
|
|
56
|
+
return SettingsPrompt(
|
|
57
|
+
JSIConverter<std::optional<std::string>>::fromJSI(runtime, obj.getProperty(runtime, "promptHeading")),
|
|
58
|
+
JSIConverter<std::optional<std::string>>::fromJSI(runtime, obj.getProperty(runtime, "promptMessage")),
|
|
59
|
+
JSIConverter<std::optional<std::string>>::fromJSI(runtime, obj.getProperty(runtime, "settingsButtonText")),
|
|
60
|
+
JSIConverter<std::optional<std::string>>::fromJSI(runtime, obj.getProperty(runtime, "notNowButtonText")),
|
|
61
|
+
JSIConverter<std::optional<std::vector<std::string>>>::fromJSI(runtime, obj.getProperty(runtime, "permissions"))
|
|
62
|
+
);
|
|
63
|
+
}
|
|
64
|
+
static inline jsi::Value toJSI(jsi::Runtime& runtime, const SettingsPrompt& arg) {
|
|
65
|
+
jsi::Object obj(runtime);
|
|
66
|
+
obj.setProperty(runtime, "promptHeading", JSIConverter<std::optional<std::string>>::toJSI(runtime, arg.promptHeading));
|
|
67
|
+
obj.setProperty(runtime, "promptMessage", JSIConverter<std::optional<std::string>>::toJSI(runtime, arg.promptMessage));
|
|
68
|
+
obj.setProperty(runtime, "settingsButtonText", JSIConverter<std::optional<std::string>>::toJSI(runtime, arg.settingsButtonText));
|
|
69
|
+
obj.setProperty(runtime, "notNowButtonText", JSIConverter<std::optional<std::string>>::toJSI(runtime, arg.notNowButtonText));
|
|
70
|
+
obj.setProperty(runtime, "permissions", JSIConverter<std::optional<std::vector<std::string>>>::toJSI(runtime, arg.permissions));
|
|
71
|
+
return obj;
|
|
72
|
+
}
|
|
73
|
+
static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
|
|
74
|
+
if (!value.isObject()) {
|
|
75
|
+
return false;
|
|
76
|
+
}
|
|
77
|
+
jsi::Object obj = value.getObject(runtime);
|
|
78
|
+
if (!JSIConverter<std::optional<std::string>>::canConvert(runtime, obj.getProperty(runtime, "promptHeading"))) return false;
|
|
79
|
+
if (!JSIConverter<std::optional<std::string>>::canConvert(runtime, obj.getProperty(runtime, "promptMessage"))) return false;
|
|
80
|
+
if (!JSIConverter<std::optional<std::string>>::canConvert(runtime, obj.getProperty(runtime, "settingsButtonText"))) return false;
|
|
81
|
+
if (!JSIConverter<std::optional<std::string>>::canConvert(runtime, obj.getProperty(runtime, "notNowButtonText"))) return false;
|
|
82
|
+
if (!JSIConverter<std::optional<std::vector<std::string>>>::canConvert(runtime, obj.getProperty(runtime, "permissions"))) return false;
|
|
83
|
+
return true;
|
|
84
|
+
}
|
|
85
|
+
};
|
|
86
|
+
|
|
87
|
+
} // namespace margelo::nitro
|
package/package.json
ADDED
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "securiti-consent-sdk",
|
|
3
|
+
"version": "1.132.0",
|
|
4
|
+
"description": "A React Native Library for managing user consent preferences and compliance with privacy regulations. Integrates with Securiti's Consent Management Platform.",
|
|
5
|
+
"main": "lib/index",
|
|
6
|
+
"module": "lib/index",
|
|
7
|
+
"types": "lib/index.d.ts",
|
|
8
|
+
"react-native": "src/index",
|
|
9
|
+
"source": "src/index",
|
|
10
|
+
"files": [
|
|
11
|
+
"src",
|
|
12
|
+
"react-native.config.js",
|
|
13
|
+
"lib",
|
|
14
|
+
"nitrogen",
|
|
15
|
+
"android/build.gradle",
|
|
16
|
+
"android/gradle.properties",
|
|
17
|
+
"android/CMakeLists.txt",
|
|
18
|
+
"android/src",
|
|
19
|
+
"ios/**/*.h",
|
|
20
|
+
"ios/**/*.m",
|
|
21
|
+
"ios/**/*.mm",
|
|
22
|
+
"ios/**/*.cpp",
|
|
23
|
+
"ios/**/*.swift",
|
|
24
|
+
"app.plugin.js",
|
|
25
|
+
"*.podspec",
|
|
26
|
+
"README.md"
|
|
27
|
+
],
|
|
28
|
+
"scripts": {
|
|
29
|
+
"postinstall": "tsc || exit 0;",
|
|
30
|
+
"typecheck": "tsc --noEmit",
|
|
31
|
+
"clean": "rm -rf android/build node_modules/**/android/build lib",
|
|
32
|
+
"lint": "eslint \"**/*.{js,ts,tsx}\" --fix",
|
|
33
|
+
"lint-ci": "eslint \"**/*.{js,ts,tsx}\" -f @jamesacarr/github-actions",
|
|
34
|
+
"typescript": "tsc",
|
|
35
|
+
"specs": "npm run typescript && nitro-codegen --logLevel=\"debug\""
|
|
36
|
+
},
|
|
37
|
+
"keywords": [
|
|
38
|
+
"react-native",
|
|
39
|
+
"nitro"
|
|
40
|
+
],
|
|
41
|
+
"repository": {
|
|
42
|
+
"type": "git",
|
|
43
|
+
"url": "git+https://github.com/securitiai/mobile-consent-sdk-ios.git"
|
|
44
|
+
},
|
|
45
|
+
"author": "Securiti.ai <apple-developers@securiti.ai> (https://github.com/securitiai)",
|
|
46
|
+
"license": "MIT",
|
|
47
|
+
"bugs": {
|
|
48
|
+
"url": "https://github.com/securitiai"
|
|
49
|
+
},
|
|
50
|
+
"homepage": "https://github.com/securitiai",
|
|
51
|
+
"publishConfig": {
|
|
52
|
+
"registry": "https://registry.npmjs.org/"
|
|
53
|
+
},
|
|
54
|
+
"devDependencies": {
|
|
55
|
+
"@react-native/eslint-config": "0.78.2",
|
|
56
|
+
"@types/jest": "^29.5.12",
|
|
57
|
+
"@types/react": "^19.0.6",
|
|
58
|
+
"eslint": "^8.57.0",
|
|
59
|
+
"eslint-config-prettier": "^9.1.0",
|
|
60
|
+
"eslint-plugin-prettier": "^5.2.1",
|
|
61
|
+
"nitro-codegen": "*",
|
|
62
|
+
"prettier": "^3.3.3",
|
|
63
|
+
"react": "19.0.0",
|
|
64
|
+
"react-native": "0.78.2",
|
|
65
|
+
"react-native-nitro-modules": "*",
|
|
66
|
+
"typescript": "^5.5.4"
|
|
67
|
+
},
|
|
68
|
+
"peerDependencies": {
|
|
69
|
+
"react": "*",
|
|
70
|
+
"react-native": "*",
|
|
71
|
+
"react-native-nitro-modules": "*"
|
|
72
|
+
},
|
|
73
|
+
"eslintConfig": {
|
|
74
|
+
"root": true,
|
|
75
|
+
"extends": [
|
|
76
|
+
"@react-native",
|
|
77
|
+
"prettier"
|
|
78
|
+
],
|
|
79
|
+
"plugins": [
|
|
80
|
+
"prettier"
|
|
81
|
+
],
|
|
82
|
+
"rules": {
|
|
83
|
+
"prettier/prettier": [
|
|
84
|
+
"warn",
|
|
85
|
+
{
|
|
86
|
+
"quoteProps": "consistent",
|
|
87
|
+
"singleQuote": true,
|
|
88
|
+
"tabWidth": 2,
|
|
89
|
+
"trailingComma": "es5",
|
|
90
|
+
"useTabs": false
|
|
91
|
+
}
|
|
92
|
+
]
|
|
93
|
+
}
|
|
94
|
+
},
|
|
95
|
+
"eslintIgnore": [
|
|
96
|
+
"node_modules/",
|
|
97
|
+
"lib/"
|
|
98
|
+
],
|
|
99
|
+
"prettier": {
|
|
100
|
+
"quoteProps": "consistent",
|
|
101
|
+
"singleQuote": true,
|
|
102
|
+
"tabWidth": 2,
|
|
103
|
+
"trailingComma": "es5",
|
|
104
|
+
"useTabs": false,
|
|
105
|
+
"semi": false
|
|
106
|
+
}
|
|
107
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
// https://github.com/react-native-community/cli/blob/main/docs/dependencies.md
|
|
2
|
+
|
|
3
|
+
module.exports = {
|
|
4
|
+
dependency: {
|
|
5
|
+
platforms: {
|
|
6
|
+
/**
|
|
7
|
+
* @type {import('@react-native-community/cli-types').IOSDependencyParams}
|
|
8
|
+
*/
|
|
9
|
+
ios: {},
|
|
10
|
+
/**
|
|
11
|
+
* @type {import('@react-native-community/cli-types').AndroidDependencyParams}
|
|
12
|
+
*/
|
|
13
|
+
android: {},
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
}
|