securiti-consent-sdk 1.132.1 → 1.133.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/README.md +1401 -32
- package/android/build.gradle +2 -2
- package/ios/HybridConsentSDK.swift +33 -7
- package/lib/ConsentSDK.nitro.js +33 -0
- package/package.json +1 -1
- package/src/ConsentSDK.nitro.ts +1 -1
package/android/build.gradle
CHANGED
|
@@ -126,7 +126,7 @@ repositories {
|
|
|
126
126
|
mavenCentral()
|
|
127
127
|
google()
|
|
128
128
|
maven {
|
|
129
|
-
url = uri("https://cdn-
|
|
129
|
+
url = uri("https://cdn-prod.securiti.ai/consent/maven")
|
|
130
130
|
}
|
|
131
131
|
}
|
|
132
132
|
|
|
@@ -138,7 +138,7 @@ dependencies {
|
|
|
138
138
|
implementation "com.facebook.react:react-native:+"
|
|
139
139
|
|
|
140
140
|
|
|
141
|
-
implementation 'ai.securiti.cmpsdkcore:consent-sdk:1.
|
|
141
|
+
implementation 'ai.securiti.cmpsdkcore:consent-sdk:1.133.0'
|
|
142
142
|
|
|
143
143
|
// Add a dependency on NitroModules
|
|
144
144
|
implementation project(":react-native-nitro-modules")
|
|
@@ -591,16 +591,34 @@ public class HybridConsentSDK : HybridConsentSDKSpec {
|
|
|
591
591
|
// Create JSON representation of purpose
|
|
592
592
|
let encoder = JSONEncoder()
|
|
593
593
|
encoder.keyEncodingStrategy = .convertToSnakeCase
|
|
594
|
-
|
|
594
|
+
|
|
595
|
+
var purposeNameMap = [String: String]()
|
|
596
|
+
|
|
597
|
+
purposeNameMap["_"] = purpose.purposeName
|
|
598
|
+
|
|
599
|
+
var purposeDescriptionMap = [String: String]()
|
|
600
|
+
|
|
601
|
+
purposeDescriptionMap["_"] = purpose.purposeDescription
|
|
602
|
+
|
|
603
|
+
var optOutTextMap = [String: String]()
|
|
604
|
+
|
|
605
|
+
optOutTextMap["_"] = purpose.optOutText
|
|
606
|
+
|
|
607
|
+
var attDescriptionMap = [String: String]()
|
|
608
|
+
|
|
609
|
+
attDescriptionMap["_"] = purpose.attDescription
|
|
610
|
+
|
|
595
611
|
// Purpose data to encode
|
|
596
612
|
let purposeData: [String: Any] = [
|
|
597
613
|
"purpose_id": purpose.purposeId as Any,
|
|
598
|
-
"purpose_name":
|
|
599
|
-
"purpose_description":
|
|
600
|
-
"sdks": [],
|
|
614
|
+
"purpose_name": purposeNameMap as Any,
|
|
615
|
+
"purpose_description": purposeDescriptionMap as Any,
|
|
616
|
+
"sdks": [],
|
|
601
617
|
"disable_opt_out": purpose.disableOptOut as Any,
|
|
602
|
-
"opt_out_text":
|
|
603
|
-
"hide_details": purpose.hideDetails as Any
|
|
618
|
+
"opt_out_text": optOutTextMap as Any,
|
|
619
|
+
"hide_details": purpose.hideDetails as Any,
|
|
620
|
+
"is_att_mapped": purpose.isATTMapped as Any,
|
|
621
|
+
"att_description": attDescriptionMap as Any
|
|
604
622
|
]
|
|
605
623
|
|
|
606
624
|
// Convert to JSON data
|
|
@@ -614,11 +632,19 @@ public class HybridConsentSDK : HybridConsentSDKSpec {
|
|
|
614
632
|
|
|
615
633
|
private func convertToAppPermission(_ permission: AppPermission) -> ConsentUI.AppPermission {
|
|
616
634
|
// Create JSON representation of permission
|
|
635
|
+
var descriptionMap: [String: String] = [:]
|
|
636
|
+
|
|
637
|
+
descriptionMap["_"] = permission.description
|
|
638
|
+
|
|
639
|
+
var nameMapObj: [String: String] = [:]
|
|
640
|
+
|
|
641
|
+
nameMapObj["_"] = permission.nameMap
|
|
642
|
+
|
|
617
643
|
let permissionData: [String: Any] = [
|
|
618
644
|
"id": permission.id as Any,
|
|
619
645
|
"name": permission.name as Any,
|
|
620
646
|
"permission_id": permission.permissionId as Any,
|
|
621
|
-
"description":
|
|
647
|
+
"description": descriptionMap as Any,
|
|
622
648
|
"group": permission.group as Any,
|
|
623
649
|
"group_id": permission.groupId as Any,
|
|
624
650
|
"name_map": permission.nameMap as Any,
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
// CmpSDKLoggerLevel constants
|
|
2
|
+
export const LoggerLevel = {
|
|
3
|
+
DEBUG: 'DEBUG',
|
|
4
|
+
INFO: 'INFO',
|
|
5
|
+
WARNING: 'WARNING',
|
|
6
|
+
ERROR: 'ERROR',
|
|
7
|
+
};
|
|
8
|
+
export const ModeValues = {
|
|
9
|
+
DRAFT: 'draft',
|
|
10
|
+
LIVE: 'live',
|
|
11
|
+
};
|
|
12
|
+
// Constants object for reference with the exact values from native SDK
|
|
13
|
+
export const ConsentStatusValues = {
|
|
14
|
+
GRANTED: 'granted',
|
|
15
|
+
DECLINED: 'declined',
|
|
16
|
+
NOT_DETERMINED: 'not_determined',
|
|
17
|
+
WITHDRAWN: 'withdrawn',
|
|
18
|
+
};
|
|
19
|
+
export const ComplianceTypeValues = {
|
|
20
|
+
NOTICE_ONLY: 'notice-only',
|
|
21
|
+
OPT_IN: 'opt-in',
|
|
22
|
+
OPT_OUT: 'opt-out',
|
|
23
|
+
};
|
|
24
|
+
export const BannerPositionValues = {
|
|
25
|
+
BOTTOM: 'bottom',
|
|
26
|
+
CENTER: 'center',
|
|
27
|
+
};
|
|
28
|
+
export const ButtonShapeValues = {
|
|
29
|
+
ROUNDED: 'rounded',
|
|
30
|
+
SQUARE: 'square',
|
|
31
|
+
PILL: 'pill',
|
|
32
|
+
OUTLINED: 'outlined',
|
|
33
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "securiti-consent-sdk",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.133.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",
|