@didomi/react-native 1.24.0 → 1.26.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/android/build.gradle +1 -1
- package/android/src/main/java/com/reactnativedidomi/DidomiModule.kt +44 -0
- package/ios/Didomi.m +13 -0
- package/ios/RNDidomi.swift +33 -0
- package/lib/commonjs/Constants.js +1 -1
- package/lib/commonjs/Constants.js.map +1 -1
- package/lib/commonjs/Didomi.js +28 -0
- package/lib/commonjs/Didomi.js.map +1 -1
- package/lib/commonjs/DidomiTypes.js.map +1 -1
- package/lib/commonjs/index.js +18 -0
- package/lib/commonjs/index.js.map +1 -1
- package/lib/module/Constants.js +1 -1
- package/lib/module/Constants.js.map +1 -1
- package/lib/module/Didomi.js +28 -0
- package/lib/module/Didomi.js.map +1 -1
- package/lib/module/DidomiTypes.js.map +1 -1
- package/lib/module/index.js +1 -1
- package/lib/module/index.js.map +1 -1
- package/lib/typescript/Constants.d.ts +1 -1
- package/lib/typescript/Didomi.d.ts +26 -1
- package/lib/typescript/DidomiTypes.d.ts +19 -0
- package/lib/typescript/index.d.ts +1 -1
- package/package.json +1 -1
- package/react-native-didomi.podspec +1 -1
- package/src/Constants.ts +1 -1
- package/src/Didomi.ts +35 -1
- package/src/DidomiTypes.ts +22 -0
- package/src/index.tsx +1 -1
package/android/build.gradle
CHANGED
|
@@ -14,6 +14,7 @@ import io.didomi.sdk.Didomi
|
|
|
14
14
|
import io.didomi.sdk.DidomiInitializeParameters
|
|
15
15
|
import io.didomi.sdk.events.*
|
|
16
16
|
import io.didomi.sdk.exceptions.DidomiNotReadyException
|
|
17
|
+
import io.didomi.sdk.models.CurrentUserStatus
|
|
17
18
|
import io.didomi.sdk.user.UserAuthWithEncryptionParams
|
|
18
19
|
import io.didomi.sdk.user.UserAuthWithHashParams
|
|
19
20
|
|
|
@@ -615,6 +616,15 @@ class DidomiModule(reactContext: ReactApplicationContext) : ReactContextBaseJava
|
|
|
615
616
|
}
|
|
616
617
|
}
|
|
617
618
|
|
|
619
|
+
@ReactMethod
|
|
620
|
+
fun getCurrentUserStatus(promise: Promise) {
|
|
621
|
+
try {
|
|
622
|
+
promise.resolve(objectToWritableMap(Didomi.getInstance().currentUserStatus))
|
|
623
|
+
} catch (e: DidomiNotReadyException) {
|
|
624
|
+
promise.reject(e)
|
|
625
|
+
}
|
|
626
|
+
}
|
|
627
|
+
|
|
618
628
|
@ReactMethod
|
|
619
629
|
fun getUserStatus(promise: Promise) {
|
|
620
630
|
try {
|
|
@@ -672,6 +682,15 @@ class DidomiModule(reactContext: ReactApplicationContext) : ReactContextBaseJava
|
|
|
672
682
|
}
|
|
673
683
|
}
|
|
674
684
|
|
|
685
|
+
@ReactMethod
|
|
686
|
+
fun shouldUserStatusBeCollected(promise: Promise) {
|
|
687
|
+
try {
|
|
688
|
+
promise.resolve(Didomi.getInstance().shouldUserStatusBeCollected())
|
|
689
|
+
} catch (e: DidomiNotReadyException) {
|
|
690
|
+
promise.reject(e)
|
|
691
|
+
}
|
|
692
|
+
}
|
|
693
|
+
|
|
675
694
|
@ReactMethod
|
|
676
695
|
fun isUserConsentStatusPartial(promise: Promise) {
|
|
677
696
|
try {
|
|
@@ -681,6 +700,15 @@ class DidomiModule(reactContext: ReactApplicationContext) : ReactContextBaseJava
|
|
|
681
700
|
}
|
|
682
701
|
}
|
|
683
702
|
|
|
703
|
+
@ReactMethod
|
|
704
|
+
fun isUserStatusPartial(promise: Promise) {
|
|
705
|
+
try {
|
|
706
|
+
promise.resolve(Didomi.getInstance().isUserStatusPartial)
|
|
707
|
+
} catch (e: DidomiNotReadyException) {
|
|
708
|
+
promise.reject(e)
|
|
709
|
+
}
|
|
710
|
+
}
|
|
711
|
+
|
|
684
712
|
@ReactMethod
|
|
685
713
|
fun isNoticeVisible(promise: Promise) {
|
|
686
714
|
try {
|
|
@@ -1009,6 +1037,21 @@ class DidomiModule(reactContext: ReactApplicationContext) : ReactContextBaseJava
|
|
|
1009
1037
|
}
|
|
1010
1038
|
}
|
|
1011
1039
|
|
|
1040
|
+
@ReactMethod
|
|
1041
|
+
fun setCurrentUserStatus(
|
|
1042
|
+
currentUserStatusAsString: String,
|
|
1043
|
+
promise: Promise
|
|
1044
|
+
) {
|
|
1045
|
+
try {
|
|
1046
|
+
val currentUserStatus = gson.fromJson(currentUserStatusAsString, CurrentUserStatus::class.java)
|
|
1047
|
+
promise.resolve(
|
|
1048
|
+
Didomi.getInstance().setCurrentUserStatus(currentUserStatus)
|
|
1049
|
+
)
|
|
1050
|
+
} catch (e: Exception) {
|
|
1051
|
+
promise.reject(e)
|
|
1052
|
+
}
|
|
1053
|
+
}
|
|
1054
|
+
|
|
1012
1055
|
@ReactMethod
|
|
1013
1056
|
fun setUserStatus(
|
|
1014
1057
|
purposesConsentStatus: Boolean,
|
|
@@ -1064,6 +1107,7 @@ class DidomiModule(reactContext: ReactApplicationContext) : ReactContextBaseJava
|
|
|
1064
1107
|
@ReactMethod
|
|
1065
1108
|
fun shouldConsentBeCollected(promise: Promise) {
|
|
1066
1109
|
try {
|
|
1110
|
+
@Suppress("DEPRECATION")
|
|
1067
1111
|
promise.resolve(Didomi.getInstance().shouldConsentBeCollected())
|
|
1068
1112
|
} catch (e: DidomiNotReadyException) {
|
|
1069
1113
|
promise.reject(e)
|
package/ios/Didomi.m
CHANGED
|
@@ -36,9 +36,15 @@ RCT_EXTERN_METHOD(setUserConsentStatus:(NSArray<NSString *> *)enabledPurposeIds
|
|
|
36
36
|
RCT_EXTERN_METHOD(isConsentRequired:(RCTPromiseResolveBlock)resolve
|
|
37
37
|
reject:(RCTPromiseRejectBlock)reject)
|
|
38
38
|
|
|
39
|
+
RCT_EXTERN_METHOD(shouldUserStatusBeCollected:(RCTPromiseResolveBlock)resolve
|
|
40
|
+
reject:(RCTPromiseRejectBlock)reject)
|
|
41
|
+
|
|
39
42
|
RCT_EXTERN_METHOD(isUserLegitimateInterestStatusPartial:(RCTPromiseResolveBlock)resolve
|
|
40
43
|
reject:(RCTPromiseRejectBlock)reject)
|
|
41
44
|
|
|
45
|
+
RCT_EXTERN_METHOD(isUserStatusPartial:(RCTPromiseResolveBlock)resolve
|
|
46
|
+
reject:(RCTPromiseRejectBlock)reject)
|
|
47
|
+
|
|
42
48
|
RCT_EXTERN_METHOD(getUserConsentStatusForPurpose:(NSString *)purposeId
|
|
43
49
|
resolve:(RCTPromiseResolveBlock)resolve
|
|
44
50
|
reject:(RCTPromiseRejectBlock)reject)
|
|
@@ -47,6 +53,9 @@ RCT_EXTERN_METHOD(getUserLegitimateInterestStatusForPurpose:(NSString *)purposeI
|
|
|
47
53
|
resolve:(RCTPromiseResolveBlock)resolve
|
|
48
54
|
reject:(RCTPromiseRejectBlock)reject)
|
|
49
55
|
|
|
56
|
+
RCT_EXTERN_METHOD(getCurrentUserStatus:(RCTPromiseResolveBlock)resolve
|
|
57
|
+
reject:(RCTPromiseRejectBlock)reject)
|
|
58
|
+
|
|
50
59
|
RCT_EXTERN_METHOD(getUserStatus:(RCTPromiseResolveBlock)resolve
|
|
51
60
|
reject:(RCTPromiseRejectBlock)reject)
|
|
52
61
|
|
|
@@ -70,6 +79,10 @@ RCT_EXTERN_METHOD(getUserLegitimateInterestStatusForVendorAndRequiredPurposes:(N
|
|
|
70
79
|
resolve:(RCTPromiseResolveBlock)resolve
|
|
71
80
|
reject:(RCTPromiseRejectBlock)reject)
|
|
72
81
|
|
|
82
|
+
RCT_EXTERN_METHOD(setCurrentUserStatus:(NSString *)currentUserStatusAsString
|
|
83
|
+
resolve:(RCTPromiseResolveBlock)resolve
|
|
84
|
+
reject:(RCTPromiseRejectBlock)reject)
|
|
85
|
+
|
|
73
86
|
RCT_EXTERN_METHOD(setUserStatus:(BOOL)purposesConsentStatus
|
|
74
87
|
purposesLIStatus:(BOOL)purposesLIStatus
|
|
75
88
|
vendorsConsentStatus:(BOOL)vendorsConsentStatus
|
package/ios/RNDidomi.swift
CHANGED
|
@@ -64,11 +64,21 @@ class RNDidomi: RCTEventEmitter {
|
|
|
64
64
|
func isConsentRequired(resolve:RCTPromiseResolveBlock, reject:RCTPromiseRejectBlock) {
|
|
65
65
|
resolve(Didomi.shared.isConsentRequired())
|
|
66
66
|
}
|
|
67
|
+
|
|
68
|
+
@objc(shouldUserStatusBeCollected:reject:)
|
|
69
|
+
func shouldUserStatusBeCollected(resolve:RCTPromiseResolveBlock, reject:RCTPromiseRejectBlock) {
|
|
70
|
+
resolve(Didomi.shared.shouldUserStatusBeCollected())
|
|
71
|
+
}
|
|
67
72
|
|
|
68
73
|
@objc(isUserConsentStatusPartial:reject:)
|
|
69
74
|
func isUserConsentStatusPartial(resolve:RCTPromiseResolveBlock, reject:RCTPromiseRejectBlock) {
|
|
70
75
|
resolve(Didomi.shared.isUserConsentStatusPartial())
|
|
71
76
|
}
|
|
77
|
+
|
|
78
|
+
@objc(isUserStatusPartial:reject:)
|
|
79
|
+
func isUserStatusPartial(resolve:RCTPromiseResolveBlock, reject:RCTPromiseRejectBlock) {
|
|
80
|
+
resolve(Didomi.shared.isUserStatusPartial())
|
|
81
|
+
}
|
|
72
82
|
|
|
73
83
|
@objc(isUserLegitimateInterestStatusPartial:reject:)
|
|
74
84
|
func isUserLegitimateInterestStatusPartial(resolve:RCTPromiseResolveBlock, reject:RCTPromiseRejectBlock) {
|
|
@@ -87,6 +97,13 @@ class RNDidomi: RCTEventEmitter {
|
|
|
87
97
|
resolve(consentStatus.rawValue.consentStatusBool)
|
|
88
98
|
}
|
|
89
99
|
|
|
100
|
+
@objc(getCurrentUserStatus:reject:)
|
|
101
|
+
func getCurrentUserStatus(resolve:RCTPromiseResolveBlock, reject:RCTPromiseRejectBlock) {
|
|
102
|
+
let encoder = JSONEncoder()
|
|
103
|
+
let currentUserStatus = try? JSONSerialization.jsonObject(with: encoder.encode(Didomi.shared.getCurrentUserStatus())) as? [String: Any]
|
|
104
|
+
resolve(currentUserStatus)
|
|
105
|
+
}
|
|
106
|
+
|
|
90
107
|
@objc(getUserStatus:reject:)
|
|
91
108
|
func getUserStatus(resolve:RCTPromiseResolveBlock, reject:RCTPromiseRejectBlock) {
|
|
92
109
|
let encoder = JSONEncoder()
|
|
@@ -124,6 +141,22 @@ class RNDidomi: RCTEventEmitter {
|
|
|
124
141
|
resolve(consentStatus.rawValue.consentStatusBool)
|
|
125
142
|
}
|
|
126
143
|
|
|
144
|
+
@objc(setCurrentUserStatus:resolve:reject:)
|
|
145
|
+
func setCurrentUserStatus(currentUserStatusAsString: String, resolve:RCTPromiseResolveBlock, reject:RCTPromiseRejectBlock) {
|
|
146
|
+
guard let jsonData = currentUserStatusAsString.data(using: .utf8) else {
|
|
147
|
+
print("Failed to convert JSON string to Data")
|
|
148
|
+
resolve(false)
|
|
149
|
+
return
|
|
150
|
+
}
|
|
151
|
+
do {
|
|
152
|
+
let currentUserStatus = try JSONDecoder().decode(CurrentUserStatus.self, from: jsonData)
|
|
153
|
+
resolve(Didomi.shared.setCurrentUserStatus(currentUserStatus: currentUserStatus))
|
|
154
|
+
} catch {
|
|
155
|
+
print("Error decoding JSON: \(error.localizedDescription)")
|
|
156
|
+
resolve(false)
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
|
|
127
160
|
@objc(setUserStatus:purposesLIStatus:vendorsConsentStatus:vendorsLIStatus:resolve:reject:)
|
|
128
161
|
func setUserStatus(purposesConsentStatus: Bool, purposesLIStatus: Bool, vendorsConsentStatus: Bool, vendorsLIStatus: Bool, resolve:RCTPromiseResolveBlock, reject:RCTPromiseRejectBlock) {
|
|
129
162
|
resolve(Didomi.shared.setUserStatus(purposesConsentStatus: purposesConsentStatus, purposesLIStatus: purposesLIStatus, vendorsConsentStatus: vendorsConsentStatus, vendorsLIStatus: vendorsLIStatus))
|
|
@@ -7,5 +7,5 @@ exports.DIDOMI_VERSION = exports.DIDOMI_USER_AGENT_NAME = void 0;
|
|
|
7
7
|
// User agent name
|
|
8
8
|
const DIDOMI_USER_AGENT_NAME = exports.DIDOMI_USER_AGENT_NAME = "Didomi React-Native SDK";
|
|
9
9
|
// User agent version
|
|
10
|
-
const DIDOMI_VERSION = exports.DIDOMI_VERSION = "1.
|
|
10
|
+
const DIDOMI_VERSION = exports.DIDOMI_VERSION = "1.26.0";
|
|
11
11
|
//# sourceMappingURL=Constants.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["DIDOMI_USER_AGENT_NAME","exports","DIDOMI_VERSION"],"sources":["Constants.ts"],"sourcesContent":["// User agent name\nexport const DIDOMI_USER_AGENT_NAME = \"Didomi React-Native SDK\"\n// User agent version\nexport const DIDOMI_VERSION = \"1.
|
|
1
|
+
{"version":3,"names":["DIDOMI_USER_AGENT_NAME","exports","DIDOMI_VERSION"],"sources":["Constants.ts"],"sourcesContent":["// User agent name\nexport const DIDOMI_USER_AGENT_NAME = \"Didomi React-Native SDK\"\n// User agent version\nexport const DIDOMI_VERSION = \"1.26.0\"\n"],"mappings":";;;;;;AAAA;AACO,MAAMA,sBAAsB,GAAAC,OAAA,CAAAD,sBAAA,GAAG,yBAAyB;AAC/D;AACO,MAAME,cAAc,GAAAD,OAAA,CAAAC,cAAA,GAAG,QAAQ"}
|
package/lib/commonjs/Didomi.js
CHANGED
|
@@ -264,6 +264,11 @@ const Didomi = exports.Didomi = {
|
|
|
264
264
|
* getUserStatus().vendors.global_legitimate_interest.disabled.
|
|
265
265
|
*/
|
|
266
266
|
getUserLegitimateInterestStatusForVendorAndRequiredPurposes: vendorId => RNDidomi.getUserLegitimateInterestStatusForVendorAndRequiredPurposes(vendorId),
|
|
267
|
+
/**
|
|
268
|
+
* Get the current user consent status.
|
|
269
|
+
* @returns: status that represents current user consent.
|
|
270
|
+
*/
|
|
271
|
+
getCurrentUserStatus: () => RNDidomi.getCurrentUserStatus(),
|
|
267
272
|
/**
|
|
268
273
|
* Get the user consent status.
|
|
269
274
|
* @returns: status that represents user consent.
|
|
@@ -300,11 +305,24 @@ const Didomi = exports.Didomi = {
|
|
|
300
305
|
* @returns: **true** if consent is required, **false** if it is not required.
|
|
301
306
|
*/
|
|
302
307
|
isConsentRequired: () => RNDidomi.isConsentRequired(),
|
|
308
|
+
/**
|
|
309
|
+
* Determine if user status should be collected for the user.
|
|
310
|
+
* Returns **true** if user status is required for the current user and regulation, and one of the following two conditions is met:
|
|
311
|
+
* - User status has never been collected for this user yet
|
|
312
|
+
* - New user status should be collected (as new vendors have been added) AND the number of days before recollecting them has exceeded
|
|
313
|
+
* @returns: **true** if user status should be collected according to these rules, **false** otherwise.
|
|
314
|
+
*/
|
|
315
|
+
shouldUserStatusBeCollected: () => RNDidomi.shouldUserStatusBeCollected(),
|
|
303
316
|
/**
|
|
304
317
|
* Determine if consent information is available for all purposes and vendors that are required
|
|
305
318
|
* @returns: **true** if consent is required and consent information is available, **false** otherwise.
|
|
306
319
|
*/
|
|
307
320
|
isUserConsentStatusPartial: () => RNDidomi.isUserConsentStatusPartial(),
|
|
321
|
+
/**
|
|
322
|
+
* Determine if user did not express a choice for any purpose or vendor that is required
|
|
323
|
+
* @returns: **true** if user choice is required and a choice is not expressed, **false** otherwise.
|
|
324
|
+
*/
|
|
325
|
+
isUserStatusPartial: () => RNDidomi.isUserStatusPartial(),
|
|
308
326
|
/**
|
|
309
327
|
* Check if the consent notice is currently displayed
|
|
310
328
|
* @returns: **true** if the notice is displayed, **false** if is not.
|
|
@@ -438,6 +456,15 @@ const Didomi = exports.Didomi = {
|
|
|
438
456
|
* @returns: **true** if consent status has been updated, **false** otherwise.
|
|
439
457
|
*/
|
|
440
458
|
setUserDisagreeToAll: () => RNDidomi.setUserDisagreeToAll(),
|
|
459
|
+
/**
|
|
460
|
+
* Set user's choices for purposes and vendors for the current regulation.
|
|
461
|
+
* @param currentUserStatus: instance of CurrentUserStatus containing the user's choices.
|
|
462
|
+
* @returns: **true** if user status has been updated, **false** otherwise.
|
|
463
|
+
*/
|
|
464
|
+
setCurrentUserStatus: currentUserStatus => {
|
|
465
|
+
const jsonString = JSON.stringify(currentUserStatus);
|
|
466
|
+
return RNDidomi.setCurrentUserStatus(jsonString);
|
|
467
|
+
},
|
|
441
468
|
/**
|
|
442
469
|
* Set the user status for purposes and vendors for consent and legitimate interest.
|
|
443
470
|
* @param purposesConsentStatus: boolean used to determine if consent will be enabled or disabled for all purposes.
|
|
@@ -462,6 +489,7 @@ const Didomi = exports.Didomi = {
|
|
|
462
489
|
/**
|
|
463
490
|
* Check if the consent should be collected depending on if we have any consents or if we have some consents but the number of days before displaying the notice again has not expired yet
|
|
464
491
|
* @returns: A boolean depending if the consent should be collected or not
|
|
492
|
+
* @deprecated use {@link #shouldUserStatusBeCollected()} instead.
|
|
465
493
|
*/
|
|
466
494
|
shouldConsentBeCollected: () => RNDidomi.shouldConsentBeCollected(),
|
|
467
495
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_reactNative","require","_DidomiListener","_Constants","Didomi","RNDidomi","NativeModules","exports","initialize","apiKey","localConfigurationPath","remoteConfigurationUrl","providerId","disableDidomiRemoteConfig","languageCode","noticeId","androidTvNoticeId","androidTvEnabled","DidomiListener","init","DIDOMI_USER_AGENT_NAME","DIDOMI_VERSION","onReady","promise","setOnReadyListener","onError","setOnErrorListener","setupUI","setLogLevel","level","addEventListener","eventType","callback","removeEventListener","removeAllEventListeners","reset","getDisabledPurposes","getDisabledPurposeIds","getDisabledVendors","getDisabledVendorIds","getEnabledPurposes","getEnabledPurposeIds","getEnabledVendors","getEnabledVendorIds","getJavaScriptForWebView","extra","getQueryStringForWebView","getPurpose","purposeId","getRequiredPurposes","getRequiredPurposeIds","getRequiredVendors","getRequiredVendorIds","getText","key","getTranslatedText","getUserConsentStatusForPurpose","getUserConsentStatusForVendor","vendorId","getUserConsentStatusForVendorAndRequiredPurposes","getUserLegitimateInterestStatusForPurpose","getUserLegitimateInterestForVendor","getUserLegitimateInterestStatusForVendor","getUserLegitimateInterestStatusForVendorAndRequiredPurposes","getUserStatus","getUserStatusForVendor","getVendor","hideNotice","hidePreferences","isConsentRequired","isUserConsentStatusPartial","isNoticeVisible","isPreferencesVisible","isError","isReady","clearUser","setUser","id","algorithm","secretId","salt","digest","setUserAndSetupUI","setUserWithHashAuth","expiration","undefined","setUserWithHashAuthWithExpiration","setUserWithHashAuthAndSetupUI","setUserWithHashAuthWithExpirationAndSetupUI","setUserWithEncryptionAuth","initializationVector","setUserWithEncryptionAuthWithExpiration","setUserWithEncryptionAuthAndSetupUI","setUserWithEncryptionAuthWithExpirationAndSetupUI","showNotice","showPreferences","view","setUserAgreeToAll","setUserConsentStatus","enabledPurposeIds","disabledPurposeIds","enabledVendorIds","disabledVendorIds","setUserDisagreeToAll","setUserStatus","purposesConsentStatus","purposesLIStatus","vendorsConsentStatus","vendorsLIStatus","setUserStatusSets","enabledConsentPurposeIds","disabledConsentPurposeIds","enabledLIPurposeIds","disabledLIPurposeIds","enabledConsentVendorIds","disabledConsentVendorIds","enabledLIVendorIds","disabledLIVendorIds","shouldConsentBeCollected","updateSelectedLanguage"],"sources":["Didomi.ts"],"sourcesContent":["import { NativeModules } from 'react-native';\nimport { DidomiListener } from './DidomiListener';\nimport { DidomiEventType, Purpose, UserStatus, Vendor } from './DidomiTypes';\nimport { DIDOMI_USER_AGENT_NAME, DIDOMI_VERSION } from './Constants';\n\nconst { Didomi: RNDidomi } = NativeModules;\n\nexport const Didomi = {\n /**\n * Initialize the Didomi SDK\n *\n * @param apiKey: Public API key of the organization from the Didomi Console.\n * @param localConfigurationPath: Path to your local config file. Defaults to didomi_config.json if null.\n * @param remoteConfigurationURL: URL to a remote configuration file to load during initialization. This parameter is not used yet. Set it to null for now.\n * @param providerId: Your provider ID (if any).\n * @param disableDidomiRemoteConfig: Whether to disable loading the remote configuration from the Didomi config. Keep this to \"false\" for loading configuration from the Didomi Console.\n * @param languageCode: Language in which the consent UI should be displayed. By default, the consent UI is displayed in the language configured in the device settings. This property allows you to override the default setting and specify a language to display the UI in. String containing the language code e.g.: \"es\", \"fr\", etc.\n * @param noticeId: Notice id for the remote configuration.\n * @param androidTvNoticeId: Notice id for the remote configuration when running on Android TV device (ignored on iOS / tvOS). Note that using remote configuration is mandatory for TV devices.\n * @param androidTvEnabled: Whether to allow Didomi SDK to run on Android TV, default to \"false\".\n */\n initialize: (\n apiKey: string,\n localConfigurationPath?: string,\n remoteConfigurationUrl?: string,\n providerId?: string,\n disableDidomiRemoteConfig: boolean = false,\n languageCode?: string,\n noticeId?: string,\n androidTvNoticeId?: string,\n androidTvEnabled: boolean = false\n ): Promise<void> => {\n // Init listener\n DidomiListener.init();\n\n // Trigger native SDK init\n return RNDidomi.initialize(\n DIDOMI_USER_AGENT_NAME,\n DIDOMI_VERSION,\n apiKey,\n localConfigurationPath,\n remoteConfigurationUrl,\n providerId,\n disableDidomiRemoteConfig,\n languageCode,\n noticeId,\n androidTvNoticeId,\n androidTvEnabled\n );\n },\n\n /**\n * Listen to SDK ready state\n */\n onReady: (): Promise<void> => {\n var promise = DidomiListener.setOnReadyListener();\n RNDidomi.onReady();\n return promise;\n },\n\n /**\n * Listen to SDK errors\n */\n onError: (): Promise<void> => {\n var promise = DidomiListener.setOnErrorListener();\n RNDidomi.onError();\n return promise;\n },\n\n /**\n * Provide the objects required to display UI elements\n */\n setupUI: (): Promise<void> => RNDidomi.setupUI(),\n\n /**\n * Set the minimum level of messages to log\n * You can decide what level of messages should be logged by the SDK by calling the setLogLevel function before initialize\n *\n * Messages with a level below `minLevel` will not be logged.\n *\n * For iOS:\n * Levels are standard levels from `OSLogType` (https://developer.apple.com/documentation/os/logging/choosing_the_log_level_for_a_message):\n * - OSLogType.info (1)\n * - OSLogType.debug (2)\n * - OSLogType.error (16)\n * - OSLogType.fault (17)\n *\n * We recommend setting `OSLogType.error` (16) in production\n *\n * For Android:\n * Use the standard log levels supported by android.util.Log: VERBOSE, DEBUG, INFO, WARN and ERROR.\n * (https://developer.android.com/reference/android/util/Log#constants_1)\n *\n * We recommend setting `Log.INFO` (4) in production\n *\n * @param minLevel: Minimum level of messages to log\n */\n setLogLevel: (level: number): Promise<void> => RNDidomi.setLogLevel(level),\n\n /**\n * Add an event listener\n * @param listener:\n */\n addEventListener: (\n eventType: DidomiEventType,\n callback: (data: any) => void\n ) => DidomiListener.addEventListener(eventType, callback),\n\n /**\n * Remove an event listener\n * @param listener:\n */\n removeEventListener: (\n eventType: DidomiEventType,\n callback: (data: any) => void\n ) => DidomiListener.removeEventListener(eventType, callback),\n\n /**\n * Remove all event listeners\n */\n removeAllEventListeners: () => DidomiListener.reset(),\n\n /**\n * Method used to get an array of disabled purposes.\n * @returns: array of disabled purposes.\n * @deprecated use {@link #getUserStatus()} instead. The result of this method\n * has been replaced by getUserStatus().purposes.consent.disabled.\n */\n getDisabledPurposes: (): Promise<Purpose[]> => RNDidomi.getDisabledPurposes(),\n\n /**\n * Method used to get a set of disabled purpose IDs.\n * @returns: set that contains the IDs of disabled purposes.\n * @deprecated use {@link #getUserStatus()} instead. The result of this method\n * has been replaced by getUserStatus().purposes.consent.enabled.\n */\n getDisabledPurposeIds: (): Promise<string[]> => RNDidomi.getDisabledPurposeIds(),\n\n /**\n * Method used to get an array of disabled vendors.\n * @returns: array of disabled vendors.\n * @deprecated use {@link #getUserStatus()} instead. The result of this method\n * has been replaced by getUserStatus().vendors.consent.disabled.\n */\n getDisabledVendors: (): Promise<Vendor[]> => RNDidomi.getDisabledVendors(),\n\n /**\n * Method used to get a set of disabled vendor IDs.\n * @returns: set that contains the IDs of disabled vendors.\n * @deprecated use {@link #getUserStatus()} instead. The result of this method\n * has been replaced by getUserStatus().vendors.consent.disabled.\n */\n getDisabledVendorIds: (): Promise<string[]> => RNDidomi.getDisabledVendorIds(),\n\n /**\n * Method used to get an array of enabled purposes.\n * @returns: array of enabled purposes.\n * @deprecated use {@link #getUserStatus()} instead. The result of this method\n * has been replaced by getUserStatus().purposes.consent.enabled.\n */\n getEnabledPurposes: (): Promise<Purpose[]> => RNDidomi.getEnabledPurposes(),\n\n /**\n * Method used to get a set of enabled purpose IDs.\n * @returns: set that contains the IDs of enabled purposes.\n * @deprecated use {@link #getUserStatus()} instead. The result of this method\n * has been replaced by getUserStatus().purposes.consent.enabled.\n */\n getEnabledPurposeIds: (): Promise<string[]> => RNDidomi.getEnabledPurposeIds(),\n\n /**\n * Method used to get an array of enabled vendors.\n * @returns: array of enabled vendors.\n * @deprecated use {@link #getUserStatus()} instead. The result of this method\n * has been replaced by getUserStatus().vendors.consent.enabled.\n */\n getEnabledVendors: (): Promise<Vendor[]> => RNDidomi.getEnabledVendors(),\n\n /**\n * Method used to get a set of enabled vendor IDs.\n * @returns: set that contains the IDs of enabled vendors.\n * @deprecated use {@link #getUserStatus()} instead. The result of this method\n * has been replaced by getUserStatus().vendors.consent.enabled.\n */\n getEnabledVendorIds: (): Promise<string[]> => RNDidomi.getEnabledVendorIds(),\n\n /**\n * Get JavaScript to embed into a WebView to pass the consent status from the app\n * to the Didomi Web SDK embedded into the WebView\n * Inject the returned JavaScript into a WebView\n * @param extra: Extra JavaScript to inject in the returned code\n * @returns: JavaScript code to inject in a WebView\n */\n getJavaScriptForWebView: (extra?: string | null): Promise<string> => RNDidomi.getJavaScriptForWebView(extra),\n\n getQueryStringForWebView: (): Promise<string> => RNDidomi.getQueryStringForWebView(),\n\n /**\n * Method used to get a Purpose based on its ID.\n * @param purposeId: purpose ID used in the search.\n * @returns: purpose found in the array.\n */\n getPurpose: (purposeId: string): Promise<Purpose> => RNDidomi.getPurpose(purposeId),\n\n /**\n * Method used to get an array of required purposes.\n *\n * @returns: array of required purposes.\n */\n getRequiredPurposes: (): Promise<Purpose[]> => RNDidomi.getRequiredPurposes(),\n\n /**\n * Get the configured purpose IDs\n * @returns: set of purpose IDs.\n */\n getRequiredPurposeIds: (): Promise<string[]> => RNDidomi.getRequiredPurposeIds(),\n\n /**\n * Method used to get an array of required vendors.\n * @returns: array of required vendors.\n */\n getRequiredVendors: (): Promise<Vendor[]> => RNDidomi.getRequiredVendors(),\n\n /**\n * Get the configured vendor IDs\n * @returns: set of vendor IDs.\n */\n getRequiredVendorIds: (): Promise<string[]> => RNDidomi.getRequiredVendorIds(),\n\n /**\n * Method used to get a dictionary/map in the form of { \"en\": \"Key in English\", \"fr\": \"Key in French.\" }\n * for a given key.\n * @param key: used to find its corresponding value in the dictionary/map.\n * @returns: dictionary containing the different translations for a given key.\n */\n getText: (key: string): Promise<any[]> => RNDidomi.getText(key),\n\n /**\n * Method used to get a translated text based on the key being passed.\n * The language and the source of this translated text will depend on the availability of the translation for the specific key.\n * The language being used will be either the selected language of the SDK (based on device Locale and other parameters) or the language specified by app developers as the default language being used by the SDK. The source can be either the `didomi_config.json` file which can be either local or remote, or the `didomi_master_config.json` file which is bundled within the SDK.\n *\n * These are the attempts performed by the SDK to try to find a translation for the specific key:\n * - Get translated value in user locale (selected language) from `didomi_config.json` (either local or remote).\n * - Get translated value in default locale (from the config) from `didomi_config.json` (either local or remote).\n * - Get translated value in user locale (selected language) from `didomi_master_config.json` (bundled within the Didomi SDK).\n * - Get translated value in default locale (from the config) from `didomi_master_config.json` (bundled within the Didomi SDK).\n *\n * If no translation can be found after these 4 attempts, the key will be returned.\n *\n * App developers can provide these translated texts through the `didomi_config.json` file (locally or remotely) in 3 different ways:\n * - Custom texts for the consent notice: https://developers.didomi.io/cmp/mobile-sdk/consent-notice/customize-the-notice#texts\n * - Custom texts for the preferences: https://developers.didomi.io/cmp/mobile-sdk/consent-notice/customize-the-preferences-popup#text\n * - Custom texts for custom notices: https://developers.didomi.io/cmp/mobile-sdk/consent-notice/customize-the-theme#translatable-texts-for-custom-notices\n *\n * @param key: used to find its corresponding value in one of the different sources.\n * @returns: a translated string if a translation was found, the same key that was passed otherwise.\n */\n getTranslatedText: (key: string): Promise<string> => RNDidomi.getTranslatedText(key),\n\n /**\n * Get the user consent status for a specific purpose\n * @param purposeId: The purpose ID to check consent for\n * @returns: The user consent status for the specified purpose\n * @deprecated use {@link #getUserStatus()} instead. Search the purposeId in\n * getUserStatus().purposes.consent.enabled or\n * getUserStatus().purposes.consent.enabled.\n */\n getUserConsentStatusForPurpose: (purposeId: string): Promise<boolean> => RNDidomi.getUserConsentStatusForPurpose(purposeId),\n\n /**\n * Get the user consent status for a specific vendor\n * @param vendorId: The vendor ID to check consent for\n * @returns: The user consent status for the specified vendor\n * @deprecated use {@link #getUserStatus()} instead. Search the vendorId in\n * getUserStatus().vendors.consent.enabled or\n * getUserStatus().vendors.consent.disabled.\n */\n getUserConsentStatusForVendor: (vendorId: string): Promise<boolean> => RNDidomi.getUserConsentStatusForVendor(vendorId),\n\n /**\n * Get the user consent status for a specific vendor and all its purposes\n * @param vendorId: The ID of the vendor\n * @returns: The user consent status corresponding to the specified vendor and all its required purposes.\n * @deprecated use {@link #getUserStatus()} instead. The result of this method has been replaced\n * by getUserStatus().vendors.global_consent.enabled or\n * getUserStatus().vendors.global_consent.disabled.\n */\n getUserConsentStatusForVendorAndRequiredPurposes: (vendorId: string): Promise<boolean> => RNDidomi.getUserConsentStatusForVendorAndRequiredPurposes(vendorId),\n\n /**\n * Get the user legitimate interest status for a specific purpose.\n * @param purposeId: purpose ID.\n * @returns: LI status of a purpose.\n * @deprecated use {@link #getUserStatus()} instead. Search the purposeId in\n * getUserStatus().purposes.consent.enabled or\n * getUserStatus().purposes.consent.enabled.\n */\n getUserLegitimateInterestStatusForPurpose: (purposeId: string): Promise<boolean> => RNDidomi.getUserLegitimateInterestStatusForPurpose(purposeId),\n\n /**\n * Get the user legitimate interest status for a specific vendor.\n * @param vendorId: vendor ID.\n * @returns: LI status of a vendor.\n * @deprecated use {@link #getUserStatus()} instead. Search the vendorId in\n * getUserStatus().vendors.legitimate_interest.enabled or\n * getUserStatus().vendors.legitimate_interest.disabled.\n */\n getUserLegitimateInterestForVendor: (vendorId: string): Promise<boolean> => RNDidomi.getUserLegitimateInterestStatusForVendor(vendorId),\n\n /**\n * Get the user LI status for a specific vendor and all its purposes.\n * @param vendorId: vendor ID.\n * @returns: The user LI status corresponding to the specified vendor and all its required purposes.\n * @deprecated use {@link #getUserStatus()} instead. Search the purposeId in\n * getUserStatus().vendors.global_legitimate_interest.enabled or\n * getUserStatus().vendors.global_legitimate_interest.disabled.\n */\n getUserLegitimateInterestStatusForVendorAndRequiredPurposes: (vendorId: string): boolean => RNDidomi.getUserLegitimateInterestStatusForVendorAndRequiredPurposes(vendorId),\n\n /**\n * Get the user consent status.\n * @returns: status that represents user consent.\n */\n getUserStatus: (): Promise<UserStatus> => RNDidomi.getUserStatus(),\n\n /**\n * Get the user consent and legitimate interest status for a specific vendor.\n * @param vendorId: vendor ID.\n * @returns: status that represents both consent and legitimate interest status of a vendor.\n * @deprecated use {@link #getUserStatus()} instead. Search the vendorId in\n * getUserStatus().vendors.global.enabled or\n * getUserStatus().vendors.global.disabled.\n */\n getUserStatusForVendor: (vendorId: string): Promise<boolean> => RNDidomi.getUserStatusForVendor(vendorId),\n\n /**\n * Method used to get a Vendor based on its ID.\n * @param vendorId: vendor ID used in the search.\n * @returns: vendor found in the array.\n */\n getVendor: (vendorId: string): Promise<Vendor> => RNDidomi.getVendor(vendorId),\n\n /**\n * Hide the notice if it is currently displayed\n */\n hideNotice: (): Promise<void> => RNDidomi.hideNotice(),\n\n /**\n * Hide the preferences popup for purposes\n */\n hidePreferences: (): Promise<void> => RNDidomi.hidePreferences(),\n\n /**\n * Determine if consent is required for the user. The rules are (OR):\n * - The user country is in the EU.\n * - The company is from the EU.\n * - The user country is unknown and the app has chosen to collect consent when unknown.\n * @returns: **true** if consent is required, **false** if it is not required.\n */\n isConsentRequired: (): Promise<boolean> => RNDidomi.isConsentRequired(),\n\n /**\n * Determine if consent information is available for all purposes and vendors that are required\n * @returns: **true** if consent is required and consent information is available, **false** otherwise.\n */\n isUserConsentStatusPartial: (): Promise<boolean> => RNDidomi.isUserConsentStatusPartial(),\n\n /**\n * Check if the consent notice is currently displayed\n * @returns: **true** if the notice is displayed, **false** if is not.\n */\n isNoticeVisible: (): Promise<boolean> => RNDidomi.isNoticeVisible(),\n\n /**\n * Method used to check if the Preferences view is visible.\n * @returns: **true** if Preferences view is visible, **false** otherwise.\n */\n isPreferencesVisible: (): Promise<boolean> => RNDidomi.isPreferencesVisible(),\n\n isError: (): Promise<boolean> => RNDidomi.isError(),\n\n /**\n * Is the Didomi SDK ready?\n */\n isReady: (): Promise<boolean> => RNDidomi.isReady(),\n\n /**\n * Clear user information\n */\n clearUser: (): Promise<void> => RNDidomi.clearUser(),\n\n /**\n * Set user information without authentication\n *\n * @param id Organization user ID\n * @param algorithm Deprecated. To set user with authentication, use setUserWithHashAuth or setUserWithEncryptionAuth.\n * @param secretId Deprecated. To set user with authentication, use setUserWithHashAuth or setUserWithEncryptionAuth.\n * @param salt Deprecated. To set user with authentication, use setUserWithHashAuth or setUserWithEncryptionAuth.\n * @param digest Deprecated. To set user with authentication, use setUserWithHashAuth or setUserWithEncryptionAuth.\n */\n setUser: (\n id: string,\n algorithm?: string,\n secretId?: string,\n salt?: string,\n digest?: string\n ): Promise<void> =>\n RNDidomi.setUser(\n id,\n algorithm,\n secretId,\n salt,\n digest\n ),\n\n /**\n * Set user information without authentication and check for missing consent\n *\n * @param id Organization user ID\n */\n setUserAndSetupUI: (id: string): Promise<void> => RNDidomi.setUserAndSetupUI(id),\n\n /**\n * Set user information with Hash authentication\n *\n * @param id Organization user ID\n * @param algorithm Algorithm used for computing the digest\n * @param secretId ID of the secret used for computing the digest\n * @param digest Digest of the organization user ID and secret\n * @param salt Salt used for computing the digest (optional)\n * @param expiration Expiration date as timestamp (to prevent replay attacks)\n */\n setUserWithHashAuth: (\n id: string,\n algorithm: string,\n secretId: string,\n digest: string,\n salt?: string,\n expiration?: BigInt\n ): void => {\n if (expiration === undefined) {\n RNDidomi.setUserWithHashAuth(\n id,\n algorithm,\n secretId,\n digest,\n salt\n );\n } else {\n RNDidomi.setUserWithHashAuthWithExpiration(\n id,\n algorithm,\n secretId,\n digest,\n salt,\n expiration\n );\n }\n },\n\n /**\n * Set user information with Hash authentication and check for missing consent\n *\n * @param id Organization user ID\n * @param algorithm Algorithm used for computing the digest\n * @param secretId ID of the secret used for computing the digest\n * @param digest Digest of the organization user ID and secret\n * @param salt Salt used for computing the digest (optional)\n * @param expiration Expiration date as timestamp (to prevent replay attacks)\n */\n setUserWithHashAuthAndSetupUI: (\n id: string,\n algorithm: string,\n secretId: string,\n digest: string,\n salt?: string,\n expiration?: BigInt\n ): void => {\n if (expiration === undefined) {\n RNDidomi.setUserWithHashAuthAndSetupUI(\n id,\n algorithm,\n secretId,\n digest,\n salt\n );\n } else {\n RNDidomi.setUserWithHashAuthWithExpirationAndSetupUI(\n id,\n algorithm,\n secretId,\n digest,\n salt,\n expiration\n );\n }\n },\n\n /**\n * Set user information with Encryption authentication\n *\n * @param id Organization user ID\n * @param algorithm Algorithm used for computing the digest\n * @param secretId ID of the secret used for computing the digest\n * @param initializationVector Initialization Vector used for computing the user ID\n * @param expiration Expiration date as timestamp (to prevent replay attacks)\n */\n setUserWithEncryptionAuth: (\n id: string,\n algorithm: string,\n secretId: string,\n initializationVector: string,\n expiration?: BigInt\n ): void => {\n if (expiration === undefined) {\n RNDidomi.setUserWithEncryptionAuth(\n id,\n algorithm,\n secretId,\n initializationVector\n );\n } else {\n RNDidomi.setUserWithEncryptionAuthWithExpiration(\n id,\n algorithm,\n secretId,\n initializationVector,\n expiration\n );\n }\n },\n\n /**\n * Set user information with Encryption authentication and check for missing consent\n *\n * @param id Organization user ID\n * @param algorithm Algorithm used for computing the digest\n * @param secretId ID of the secret used for computing the digest\n * @param initializationVector Initialization Vector used for computing the user ID\n * @param expiration Expiration date as timestamp (to prevent replay attacks)\n */\n setUserWithEncryptionAuthAndSetupUI: (\n id: string,\n algorithm: string,\n secretId: string,\n initializationVector: string,\n expiration?: BigInt\n ): void => {\n if (expiration === undefined) {\n RNDidomi.setUserWithEncryptionAuthAndSetupUI(\n id,\n algorithm,\n secretId,\n initializationVector\n );\n } else {\n RNDidomi.setUserWithEncryptionAuthWithExpirationAndSetupUI(\n id,\n algorithm,\n secretId,\n initializationVector,\n expiration\n );\n }\n },\n\n /**\n * Show the consent notice (if required, not disabled in the config and not already displayed)\n */\n showNotice: (): Promise<void> => RNDidomi.showNotice(),\n\n /**\n * Show the preferences screen when/if the SDK is ready. By default the purposes list will be displayed.\n * @param view: It can be `purposes` or `vendors`\n */\n showPreferences: (view?: string): Promise<void> => RNDidomi.showPreferences(view),\n\n /**\n * Remove all consents for the user\n */\n reset: (): Promise<void> => RNDidomi.reset(),\n\n /**\n * Method that allows to enable consent and legitimate interest for all the required purposes.\n * @returns: **true** if consent status has been updated, **false** otherwise.\n */\n setUserAgreeToAll: (): Promise<boolean> => RNDidomi.setUserAgreeToAll(),\n\n /**\n * Set the user consent status.\n * @param enabledPurposeIds: set containing **enabled purpose ids**\n * @param disabledPurposeIds: set containing **disabled purpose ids**\n * @param enabledVendorIds: set containing **enabled vendor ids**\n * @param disabledVendorIds: set containing **disabled purpose ids**\n * @returns: **true** if consent status has been updated, **false** otherwise.\n */\n setUserConsentStatus: (\n enabledPurposeIds: string[],\n disabledPurposeIds: string[],\n enabledVendorIds: string[],\n disabledVendorIds: string[]\n ): Promise<boolean> =>\n RNDidomi.setUserConsentStatus(\n enabledPurposeIds,\n disabledPurposeIds,\n enabledVendorIds,\n disabledVendorIds\n ),\n\n /**\n * Method that allows to disable consent and legitimate interest for all the required purposes and vendors.\n * @returns: **true** if consent status has been updated, **false** otherwise.\n */\n setUserDisagreeToAll: (): Promise<boolean> => RNDidomi.setUserDisagreeToAll(),\n\n /**\n * Set the user status for purposes and vendors for consent and legitimate interest.\n * @param purposesConsentStatus: boolean used to determine if consent will be enabled or disabled for all purposes.\n * @param purposesLIStatus: boolean used to determine if legitimate interest will be enabled or disabled for all purposes.\n * @param vendorsConsentStatus: boolean used to determine if consent will be enabled or disabled for all vendors.\n * @param vendorsLIStatus: boolean used to determine if legitimate interest will be enabled or disabled for all vendors.\n * @returns: **true** if consent status has been updated, **false** otherwise.\n */\n setUserStatus: (\n purposesConsentStatus: boolean,\n purposesLIStatus: boolean,\n vendorsConsentStatus: boolean,\n vendorsLIStatus: boolean\n ): Promise<boolean> =>\n RNDidomi.setUserStatus(\n purposesConsentStatus,\n purposesLIStatus,\n vendorsConsentStatus,\n vendorsLIStatus\n ),\n\n /**\n * Set the user status for purposes and vendors for consent and legitimate interest.\n * @param enabledConsentPurposeIds: List of purpose IDs to enable for consent.\n * @param disabledConsentPurposeIds: List of purpose IDs to disable for consent.\n * @param enabledLIPurposeIds: List of purpose IDs to enable for LI.\n * @param disabledLIPurposeIds: List of purpose IDs to disable for LI.\n * @param enabledConsentVendorIds: List of vendor IDs to enable for consent.\n * @param disabledConsentVendorIds: List of vendor IDs to disable for consent.\n * @param enabledLIVendorIds: List of vendor IDs to enable for LI.\n * @param disabledLIVendorIds: List of vendor IDs to disable for LI.\n */\n setUserStatusSets: (\n enabledConsentPurposeIds: string[],\n disabledConsentPurposeIds: string[],\n enabledLIPurposeIds: string[],\n disabledLIPurposeIds: string[],\n enabledConsentVendorIds: string[],\n disabledConsentVendorIds: string[],\n enabledLIVendorIds: string[],\n disabledLIVendorIds: string[]\n ): Promise<boolean> =>\n RNDidomi.setUserStatusSets(\n enabledConsentPurposeIds,\n disabledConsentPurposeIds,\n enabledLIPurposeIds,\n disabledLIPurposeIds,\n enabledConsentVendorIds,\n disabledConsentVendorIds,\n enabledLIVendorIds,\n disabledLIVendorIds\n ),\n\n /**\n * Check if the consent should be collected depending on if we have any consents or if we have some consents but the number of days before displaying the notice again has not expired yet\n * @returns: A boolean depending if the consent should be collected or not\n */\n shouldConsentBeCollected: (): Promise<boolean> =>\n RNDidomi.shouldConsentBeCollected(),\n\n /**\n * Method used to update the selected language of the Didomi SDK and any property that depends on it.\n * In most cases this method doesn't need to be called. It would only be required for those apps that allow language change on-the-fly, i.e.: from within the app rather than from the device settings.\n * In order to update the language of the views displayed by the Didomi SDK, this method needs to be called before these views are displayed.\n * @param languageCode: string containing the language code e.g.: \"es\", \"fr\", etc.\n */\n updateSelectedLanguage: (languageCode: string): Promise<void> =>\n RNDidomi.updateSelectedLanguage(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BACF,CAAC;EAEH;AACF;AACA;AACA;EACEC,wBAAwB,EAAEA,CAAA,KACxBjH,QAAQ,CAACiH,wBAAwB,CAAC,CAAC;EAErC;AACF;AACA;AACA;AACA;AACA;EACEC,sBAAsB,EAAGzG,YAAoB,IAC3CT,QAAQ,CAACkH,sBAAsB,CAACzG,YAAY;AAChD,CAAC"}
|
|
1
|
+
{"version":3,"names":["_reactNative","require","_DidomiListener","_Constants","Didomi","RNDidomi","NativeModules","exports","initialize","apiKey","localConfigurationPath","remoteConfigurationUrl","providerId","disableDidomiRemoteConfig","languageCode","noticeId","androidTvNoticeId","androidTvEnabled","DidomiListener","init","DIDOMI_USER_AGENT_NAME","DIDOMI_VERSION","onReady","promise","setOnReadyListener","onError","setOnErrorListener","setupUI","setLogLevel","level","addEventListener","eventType","callback","removeEventListener","removeAllEventListeners","reset","getDisabledPurposes","getDisabledPurposeIds","getDisabledVendors","getDisabledVendorIds","getEnabledPurposes","getEnabledPurposeIds","getEnabledVendors","getEnabledVendorIds","getJavaScriptForWebView","extra","getQueryStringForWebView","getPurpose","purposeId","getRequiredPurposes","getRequiredPurposeIds","getRequiredVendors","getRequiredVendorIds","getText","key","getTranslatedText","getUserConsentStatusForPurpose","getUserConsentStatusForVendor","vendorId","getUserConsentStatusForVendorAndRequiredPurposes","getUserLegitimateInterestStatusForPurpose","getUserLegitimateInterestForVendor","getUserLegitimateInterestStatusForVendor","getUserLegitimateInterestStatusForVendorAndRequiredPurposes","getCurrentUserStatus","getUserStatus","getUserStatusForVendor","getVendor","hideNotice","hidePreferences","isConsentRequired","shouldUserStatusBeCollected","isUserConsentStatusPartial","isUserStatusPartial","isNoticeVisible","isPreferencesVisible","isError","isReady","clearUser","setUser","id","algorithm","secretId","salt","digest","setUserAndSetupUI","setUserWithHashAuth","expiration","undefined","setUserWithHashAuthWithExpiration","setUserWithHashAuthAndSetupUI","setUserWithHashAuthWithExpirationAndSetupUI","setUserWithEncryptionAuth","initializationVector","setUserWithEncryptionAuthWithExpiration","setUserWithEncryptionAuthAndSetupUI","setUserWithEncryptionAuthWithExpirationAndSetupUI","showNotice","showPreferences","view","setUserAgreeToAll","setUserConsentStatus","enabledPurposeIds","disabledPurposeIds","enabledVendorIds","disabledVendorIds","setUserDisagreeToAll","setCurrentUserStatus","currentUserStatus","jsonString","JSON","stringify","setUserStatus","purposesConsentStatus","purposesLIStatus","vendorsConsentStatus","vendorsLIStatus","setUserStatusSets","enabledConsentPurposeIds","disabledConsentPurposeIds","enabledLIPurposeIds","disabledLIPurposeIds","enabledConsentVendorIds","disabledConsentVendorIds","enabledLIVendorIds","disabledLIVendorIds","shouldConsentBeCollected","updateSelectedLanguage"],"sources":["Didomi.ts"],"sourcesContent":["import { NativeModules } from 'react-native';\nimport { DidomiListener } from './DidomiListener';\nimport { DidomiEventType, Purpose, Vendor, UserStatus, CurrentUserStatus } from './DidomiTypes';\nimport { DIDOMI_USER_AGENT_NAME, DIDOMI_VERSION } from './Constants';\n\nconst { Didomi: RNDidomi } = NativeModules;\n\nexport const Didomi = {\n /**\n * Initialize the Didomi SDK\n *\n * @param apiKey: Public API key of the organization from the Didomi Console.\n * @param localConfigurationPath: Path to your local config file. Defaults to didomi_config.json if null.\n * @param remoteConfigurationURL: URL to a remote configuration file to load during initialization. This parameter is not used yet. Set it to null for now.\n * @param providerId: Your provider ID (if any).\n * @param disableDidomiRemoteConfig: Whether to disable loading the remote configuration from the Didomi config. Keep this to \"false\" for loading configuration from the Didomi Console.\n * @param languageCode: Language in which the consent UI should be displayed. By default, the consent UI is displayed in the language configured in the device settings. This property allows you to override the default setting and specify a language to display the UI in. String containing the language code e.g.: \"es\", \"fr\", etc.\n * @param noticeId: Notice id for the remote configuration.\n * @param androidTvNoticeId: Notice id for the remote configuration when running on Android TV device (ignored on iOS / tvOS). Note that using remote configuration is mandatory for TV devices.\n * @param androidTvEnabled: Whether to allow Didomi SDK to run on Android TV, default to \"false\".\n */\n initialize: (\n apiKey: string,\n localConfigurationPath?: string,\n remoteConfigurationUrl?: string,\n providerId?: string,\n disableDidomiRemoteConfig: boolean = false,\n languageCode?: string,\n noticeId?: string,\n androidTvNoticeId?: string,\n androidTvEnabled: boolean = false\n ): Promise<void> => {\n // Init listener\n DidomiListener.init();\n\n // Trigger native SDK init\n return RNDidomi.initialize(\n DIDOMI_USER_AGENT_NAME,\n DIDOMI_VERSION,\n apiKey,\n localConfigurationPath,\n remoteConfigurationUrl,\n providerId,\n disableDidomiRemoteConfig,\n languageCode,\n noticeId,\n androidTvNoticeId,\n androidTvEnabled\n );\n },\n\n /**\n * Listen to SDK ready state\n */\n onReady: (): Promise<void> => {\n var promise = DidomiListener.setOnReadyListener();\n RNDidomi.onReady();\n return promise;\n },\n\n /**\n * Listen to SDK errors\n */\n onError: (): Promise<void> => {\n var promise = DidomiListener.setOnErrorListener();\n RNDidomi.onError();\n return promise;\n },\n\n /**\n * Provide the objects required to display UI elements\n */\n setupUI: (): Promise<void> => RNDidomi.setupUI(),\n\n /**\n * Set the minimum level of messages to log\n * You can decide what level of messages should be logged by the SDK by calling the setLogLevel function before initialize\n *\n * Messages with a level below `minLevel` will not be logged.\n *\n * For iOS:\n * Levels are standard levels from `OSLogType` (https://developer.apple.com/documentation/os/logging/choosing_the_log_level_for_a_message):\n * - OSLogType.info (1)\n * - OSLogType.debug (2)\n * - OSLogType.error (16)\n * - OSLogType.fault (17)\n *\n * We recommend setting `OSLogType.error` (16) in production\n *\n * For Android:\n * Use the standard log levels supported by android.util.Log: VERBOSE, DEBUG, INFO, WARN and ERROR.\n * (https://developer.android.com/reference/android/util/Log#constants_1)\n *\n * We recommend setting `Log.INFO` (4) in production\n *\n * @param minLevel: Minimum level of messages to log\n */\n setLogLevel: (level: number): Promise<void> => RNDidomi.setLogLevel(level),\n\n /**\n * Add an event listener\n * @param listener:\n */\n addEventListener: (\n eventType: DidomiEventType,\n callback: (data: any) => void\n ) => DidomiListener.addEventListener(eventType, callback),\n\n /**\n * Remove an event listener\n * @param listener:\n */\n removeEventListener: (\n eventType: DidomiEventType,\n callback: (data: any) => void\n ) => DidomiListener.removeEventListener(eventType, callback),\n\n /**\n * Remove all event listeners\n */\n removeAllEventListeners: () => DidomiListener.reset(),\n\n /**\n * Method used to get an array of disabled purposes.\n * @returns: array of disabled purposes.\n * @deprecated use {@link #getUserStatus()} instead. The result of this method\n * has been replaced by getUserStatus().purposes.consent.disabled.\n */\n getDisabledPurposes: (): Promise<Purpose[]> => RNDidomi.getDisabledPurposes(),\n\n /**\n * Method used to get a set of disabled purpose IDs.\n * @returns: set that contains the IDs of disabled purposes.\n * @deprecated use {@link #getUserStatus()} instead. The result of this method\n * has been replaced by getUserStatus().purposes.consent.enabled.\n */\n getDisabledPurposeIds: (): Promise<string[]> => RNDidomi.getDisabledPurposeIds(),\n\n /**\n * Method used to get an array of disabled vendors.\n * @returns: array of disabled vendors.\n * @deprecated use {@link #getUserStatus()} instead. The result of this method\n * has been replaced by getUserStatus().vendors.consent.disabled.\n */\n getDisabledVendors: (): Promise<Vendor[]> => RNDidomi.getDisabledVendors(),\n\n /**\n * Method used to get a set of disabled vendor IDs.\n * @returns: set that contains the IDs of disabled vendors.\n * @deprecated use {@link #getUserStatus()} instead. The result of this method\n * has been replaced by getUserStatus().vendors.consent.disabled.\n */\n getDisabledVendorIds: (): Promise<string[]> => RNDidomi.getDisabledVendorIds(),\n\n /**\n * Method used to get an array of enabled purposes.\n * @returns: array of enabled purposes.\n * @deprecated use {@link #getUserStatus()} instead. The result of this method\n * has been replaced by getUserStatus().purposes.consent.enabled.\n */\n getEnabledPurposes: (): Promise<Purpose[]> => RNDidomi.getEnabledPurposes(),\n\n /**\n * Method used to get a set of enabled purpose IDs.\n * @returns: set that contains the IDs of enabled purposes.\n * @deprecated use {@link #getUserStatus()} instead. The result of this method\n * has been replaced by getUserStatus().purposes.consent.enabled.\n */\n getEnabledPurposeIds: (): Promise<string[]> => RNDidomi.getEnabledPurposeIds(),\n\n /**\n * Method used to get an array of enabled vendors.\n * @returns: array of enabled vendors.\n * @deprecated use {@link #getUserStatus()} instead. The result of this method\n * has been replaced by getUserStatus().vendors.consent.enabled.\n */\n getEnabledVendors: (): Promise<Vendor[]> => RNDidomi.getEnabledVendors(),\n\n /**\n * Method used to get a set of enabled vendor IDs.\n * @returns: set that contains the IDs of enabled vendors.\n * @deprecated use {@link #getUserStatus()} instead. The result of this method\n * has been replaced by getUserStatus().vendors.consent.enabled.\n */\n getEnabledVendorIds: (): Promise<string[]> => RNDidomi.getEnabledVendorIds(),\n\n /**\n * Get JavaScript to embed into a WebView to pass the consent status from the app\n * to the Didomi Web SDK embedded into the WebView\n * Inject the returned JavaScript into a WebView\n * @param extra: Extra JavaScript to inject in the returned code\n * @returns: JavaScript code to inject in a WebView\n */\n getJavaScriptForWebView: (extra?: string | null): Promise<string> => RNDidomi.getJavaScriptForWebView(extra),\n\n getQueryStringForWebView: (): Promise<string> => RNDidomi.getQueryStringForWebView(),\n\n /**\n * Method used to get a Purpose based on its ID.\n * @param purposeId: purpose ID used in the search.\n * @returns: purpose found in the array.\n */\n getPurpose: (purposeId: string): Promise<Purpose> => RNDidomi.getPurpose(purposeId),\n\n /**\n * Method used to get an array of required purposes.\n *\n * @returns: array of required purposes.\n */\n getRequiredPurposes: (): Promise<Purpose[]> => RNDidomi.getRequiredPurposes(),\n\n /**\n * Get the configured purpose IDs\n * @returns: set of purpose IDs.\n */\n getRequiredPurposeIds: (): Promise<string[]> => RNDidomi.getRequiredPurposeIds(),\n\n /**\n * Method used to get an array of required vendors.\n * @returns: array of required vendors.\n */\n getRequiredVendors: (): Promise<Vendor[]> => RNDidomi.getRequiredVendors(),\n\n /**\n * Get the configured vendor IDs\n * @returns: set of vendor IDs.\n */\n getRequiredVendorIds: (): Promise<string[]> => RNDidomi.getRequiredVendorIds(),\n\n /**\n * Method used to get a dictionary/map in the form of { \"en\": \"Key in English\", \"fr\": \"Key in French.\" }\n * for a given key.\n * @param key: used to find its corresponding value in the dictionary/map.\n * @returns: dictionary containing the different translations for a given key.\n */\n getText: (key: string): Promise<any[]> => RNDidomi.getText(key),\n\n /**\n * Method used to get a translated text based on the key being passed.\n * The language and the source of this translated text will depend on the availability of the translation for the specific key.\n * The language being used will be either the selected language of the SDK (based on device Locale and other parameters) or the language specified by app developers as the default language being used by the SDK. The source can be either the `didomi_config.json` file which can be either local or remote, or the `didomi_master_config.json` file which is bundled within the SDK.\n *\n * These are the attempts performed by the SDK to try to find a translation for the specific key:\n * - Get translated value in user locale (selected language) from `didomi_config.json` (either local or remote).\n * - Get translated value in default locale (from the config) from `didomi_config.json` (either local or remote).\n * - Get translated value in user locale (selected language) from `didomi_master_config.json` (bundled within the Didomi SDK).\n * - Get translated value in default locale (from the config) from `didomi_master_config.json` (bundled within the Didomi SDK).\n *\n * If no translation can be found after these 4 attempts, the key will be returned.\n *\n * App developers can provide these translated texts through the `didomi_config.json` file (locally or remotely) in 3 different ways:\n * - Custom texts for the consent notice: https://developers.didomi.io/cmp/mobile-sdk/consent-notice/customize-the-notice#texts\n * - Custom texts for the preferences: https://developers.didomi.io/cmp/mobile-sdk/consent-notice/customize-the-preferences-popup#text\n * - Custom texts for custom notices: https://developers.didomi.io/cmp/mobile-sdk/consent-notice/customize-the-theme#translatable-texts-for-custom-notices\n *\n * @param key: used to find its corresponding value in one of the different sources.\n * @returns: a translated string if a translation was found, the same key that was passed otherwise.\n */\n getTranslatedText: (key: string): Promise<string> => RNDidomi.getTranslatedText(key),\n\n /**\n * Get the user consent status for a specific purpose\n * @param purposeId: The purpose ID to check consent for\n * @returns: The user consent status for the specified purpose\n * @deprecated use {@link #getUserStatus()} instead. Search the purposeId in\n * getUserStatus().purposes.consent.enabled or\n * getUserStatus().purposes.consent.enabled.\n */\n getUserConsentStatusForPurpose: (purposeId: string): Promise<boolean> => RNDidomi.getUserConsentStatusForPurpose(purposeId),\n\n /**\n * Get the user consent status for a specific vendor\n * @param vendorId: The vendor ID to check consent for\n * @returns: The user consent status for the specified vendor\n * @deprecated use {@link #getUserStatus()} instead. Search the vendorId in\n * getUserStatus().vendors.consent.enabled or\n * getUserStatus().vendors.consent.disabled.\n */\n getUserConsentStatusForVendor: (vendorId: string): Promise<boolean> => RNDidomi.getUserConsentStatusForVendor(vendorId),\n\n /**\n * Get the user consent status for a specific vendor and all its purposes\n * @param vendorId: The ID of the vendor\n * @returns: The user consent status corresponding to the specified vendor and all its required purposes.\n * @deprecated use {@link #getUserStatus()} instead. The result of this method has been replaced\n * by getUserStatus().vendors.global_consent.enabled or\n * getUserStatus().vendors.global_consent.disabled.\n */\n getUserConsentStatusForVendorAndRequiredPurposes: (vendorId: string): Promise<boolean> => RNDidomi.getUserConsentStatusForVendorAndRequiredPurposes(vendorId),\n\n /**\n * Get the user legitimate interest status for a specific purpose.\n * @param purposeId: purpose ID.\n * @returns: LI status of a purpose.\n * @deprecated use {@link #getUserStatus()} instead. Search the purposeId in\n * getUserStatus().purposes.consent.enabled or\n * getUserStatus().purposes.consent.enabled.\n */\n getUserLegitimateInterestStatusForPurpose: (purposeId: string): Promise<boolean> => RNDidomi.getUserLegitimateInterestStatusForPurpose(purposeId),\n\n /**\n * Get the user legitimate interest status for a specific vendor.\n * @param vendorId: vendor ID.\n * @returns: LI status of a vendor.\n * @deprecated use {@link #getUserStatus()} instead. Search the vendorId in\n * getUserStatus().vendors.legitimate_interest.enabled or\n * getUserStatus().vendors.legitimate_interest.disabled.\n */\n getUserLegitimateInterestForVendor: (vendorId: string): Promise<boolean> => RNDidomi.getUserLegitimateInterestStatusForVendor(vendorId),\n\n /**\n * Get the user LI status for a specific vendor and all its purposes.\n * @param vendorId: vendor ID.\n * @returns: The user LI status corresponding to the specified vendor and all its required purposes.\n * @deprecated use {@link #getUserStatus()} instead. Search the purposeId in\n * getUserStatus().vendors.global_legitimate_interest.enabled or\n * getUserStatus().vendors.global_legitimate_interest.disabled.\n */\n getUserLegitimateInterestStatusForVendorAndRequiredPurposes: (vendorId: string): boolean => RNDidomi.getUserLegitimateInterestStatusForVendorAndRequiredPurposes(vendorId),\n\n /**\n * Get the current user consent status.\n * @returns: status that represents current user consent.\n */\n getCurrentUserStatus: (): Promise<CurrentUserStatus> => RNDidomi.getCurrentUserStatus(),\n\n /**\n * Get the user consent status.\n * @returns: status that represents user consent.\n */\n getUserStatus: (): Promise<UserStatus> => RNDidomi.getUserStatus(),\n\n /**\n * Get the user consent and legitimate interest status for a specific vendor.\n * @param vendorId: vendor ID.\n * @returns: status that represents both consent and legitimate interest status of a vendor.\n * @deprecated use {@link #getUserStatus()} instead. Search the vendorId in\n * getUserStatus().vendors.global.enabled or\n * getUserStatus().vendors.global.disabled.\n */\n getUserStatusForVendor: (vendorId: string): Promise<boolean> => RNDidomi.getUserStatusForVendor(vendorId),\n\n /**\n * Method used to get a Vendor based on its ID.\n * @param vendorId: vendor ID used in the search.\n * @returns: vendor found in the array.\n */\n getVendor: (vendorId: string): Promise<Vendor> => RNDidomi.getVendor(vendorId),\n\n /**\n * Hide the notice if it is currently displayed\n */\n hideNotice: (): Promise<void> => RNDidomi.hideNotice(),\n\n /**\n * Hide the preferences popup for purposes\n */\n hidePreferences: (): Promise<void> => RNDidomi.hidePreferences(),\n\n /**\n * Determine if consent is required for the user. The rules are (OR):\n * - The user country is in the EU.\n * - The company is from the EU.\n * - The user country is unknown and the app has chosen to collect consent when unknown.\n * @returns: **true** if consent is required, **false** if it is not required.\n */\n isConsentRequired: (): Promise<boolean> => RNDidomi.isConsentRequired(),\n\n /**\n * Determine if user status should be collected for the user.\n * Returns **true** if user status is required for the current user and regulation, and one of the following two conditions is met:\n * - User status has never been collected for this user yet\n * - New user status should be collected (as new vendors have been added) AND the number of days before recollecting them has exceeded\n * @returns: **true** if user status should be collected according to these rules, **false** otherwise.\n */\n shouldUserStatusBeCollected: (): Promise<boolean> => RNDidomi.shouldUserStatusBeCollected(),\n\n /**\n * Determine if consent information is available for all purposes and vendors that are required\n * @returns: **true** if consent is required and consent information is available, **false** otherwise.\n */\n isUserConsentStatusPartial: (): Promise<boolean> => RNDidomi.isUserConsentStatusPartial(),\n\n /**\n * Determine if user did not express a choice for any purpose or vendor that is required\n * @returns: **true** if user choice is required and a choice is not expressed, **false** otherwise.\n */\n isUserStatusPartial: (): Promise<boolean> => RNDidomi.isUserStatusPartial(),\n\n /**\n * Check if the consent notice is currently displayed\n * @returns: **true** if the notice is displayed, **false** if is not.\n */\n isNoticeVisible: (): Promise<boolean> => RNDidomi.isNoticeVisible(),\n\n /**\n * Method used to check if the Preferences view is visible.\n * @returns: **true** if Preferences view is visible, **false** otherwise.\n */\n isPreferencesVisible: (): Promise<boolean> => RNDidomi.isPreferencesVisible(),\n\n isError: (): Promise<boolean> => RNDidomi.isError(),\n\n /**\n * Is the Didomi SDK ready?\n */\n isReady: (): Promise<boolean> => RNDidomi.isReady(),\n\n /**\n * Clear user information\n */\n clearUser: (): Promise<void> => RNDidomi.clearUser(),\n\n /**\n * Set user information without authentication\n *\n * @param id Organization user ID\n * @param algorithm Deprecated. To set user with authentication, use setUserWithHashAuth or setUserWithEncryptionAuth.\n * @param secretId Deprecated. To set user with authentication, use setUserWithHashAuth or setUserWithEncryptionAuth.\n * @param salt Deprecated. To set user with authentication, use setUserWithHashAuth or setUserWithEncryptionAuth.\n * @param digest Deprecated. To set user with authentication, use setUserWithHashAuth or setUserWithEncryptionAuth.\n */\n setUser: (\n id: string,\n algorithm?: string,\n secretId?: string,\n salt?: string,\n digest?: string\n ): Promise<void> =>\n RNDidomi.setUser(\n id,\n algorithm,\n secretId,\n salt,\n digest\n ),\n\n /**\n * Set user information without authentication and check for missing consent\n *\n * @param id Organization user ID\n */\n setUserAndSetupUI: (id: string): Promise<void> => RNDidomi.setUserAndSetupUI(id),\n\n /**\n * Set user information with Hash authentication\n *\n * @param id Organization user ID\n * @param algorithm Algorithm used for computing the digest\n * @param secretId ID of the secret used for computing the digest\n * @param digest Digest of the organization user ID and secret\n * @param salt Salt used for computing the digest (optional)\n * @param expiration Expiration date as timestamp (to prevent replay attacks)\n */\n setUserWithHashAuth: (\n id: string,\n algorithm: string,\n secretId: string,\n digest: string,\n salt?: string,\n expiration?: BigInt\n ): void => {\n if (expiration === undefined) {\n RNDidomi.setUserWithHashAuth(\n id,\n algorithm,\n secretId,\n digest,\n salt\n );\n } else {\n RNDidomi.setUserWithHashAuthWithExpiration(\n id,\n algorithm,\n secretId,\n digest,\n salt,\n expiration\n );\n }\n },\n\n /**\n * Set user information with Hash authentication and check for missing consent\n *\n * @param id Organization user ID\n * @param algorithm Algorithm used for computing the digest\n * @param secretId ID of the secret used for computing the digest\n * @param digest Digest of the organization user ID and secret\n * @param salt Salt used for computing the digest (optional)\n * @param expiration Expiration date as timestamp (to prevent replay attacks)\n */\n setUserWithHashAuthAndSetupUI: (\n id: string,\n algorithm: string,\n secretId: string,\n digest: string,\n salt?: string,\n expiration?: BigInt\n ): void => {\n if (expiration === undefined) {\n RNDidomi.setUserWithHashAuthAndSetupUI(\n id,\n algorithm,\n secretId,\n digest,\n salt\n );\n } else {\n RNDidomi.setUserWithHashAuthWithExpirationAndSetupUI(\n id,\n algorithm,\n secretId,\n digest,\n salt,\n expiration\n );\n }\n },\n\n /**\n * Set user information with Encryption authentication\n *\n * @param id Organization user ID\n * @param algorithm Algorithm used for computing the digest\n * @param secretId ID of the secret used for computing the digest\n * @param initializationVector Initialization Vector used for computing the user ID\n * @param expiration Expiration date as timestamp (to prevent replay attacks)\n */\n setUserWithEncryptionAuth: (\n id: string,\n algorithm: string,\n secretId: string,\n initializationVector: string,\n expiration?: BigInt\n ): void => {\n if (expiration === undefined) {\n RNDidomi.setUserWithEncryptionAuth(\n id,\n algorithm,\n secretId,\n initializationVector\n );\n } else {\n RNDidomi.setUserWithEncryptionAuthWithExpiration(\n id,\n algorithm,\n secretId,\n initializationVector,\n expiration\n );\n }\n },\n\n /**\n * Set user information with Encryption authentication and check for missing consent\n *\n * @param id Organization user ID\n * @param algorithm Algorithm used for computing the digest\n * @param secretId ID of the secret used for computing the digest\n * @param initializationVector Initialization Vector used for computing the user ID\n * @param expiration Expiration date as timestamp (to prevent replay attacks)\n */\n setUserWithEncryptionAuthAndSetupUI: (\n id: string,\n algorithm: string,\n secretId: string,\n initializationVector: string,\n expiration?: BigInt\n ): void => {\n if (expiration === undefined) {\n RNDidomi.setUserWithEncryptionAuthAndSetupUI(\n id,\n algorithm,\n secretId,\n initializationVector\n );\n } else {\n RNDidomi.setUserWithEncryptionAuthWithExpirationAndSetupUI(\n id,\n algorithm,\n secretId,\n initializationVector,\n expiration\n );\n }\n },\n\n /**\n * Show the consent notice (if required, not disabled in the config and not already displayed)\n */\n showNotice: (): Promise<void> => RNDidomi.showNotice(),\n\n /**\n * Show the preferences screen when/if the SDK is ready. By default the purposes list will be displayed.\n * @param view: It can be `purposes` or `vendors`\n */\n showPreferences: (view?: string): Promise<void> => RNDidomi.showPreferences(view),\n\n /**\n * Remove all consents for the user\n */\n reset: (): Promise<void> => RNDidomi.reset(),\n\n /**\n * Method that allows to enable consent and legitimate interest for all the required purposes.\n * @returns: **true** if consent status has been updated, **false** otherwise.\n */\n setUserAgreeToAll: (): Promise<boolean> => RNDidomi.setUserAgreeToAll(),\n\n /**\n * Set the user consent status.\n * @param enabledPurposeIds: set containing **enabled purpose ids**\n * @param disabledPurposeIds: set containing **disabled purpose ids**\n * @param enabledVendorIds: set containing **enabled vendor ids**\n * @param disabledVendorIds: set containing **disabled purpose ids**\n * @returns: **true** if consent status has been updated, **false** otherwise.\n */\n setUserConsentStatus: (\n enabledPurposeIds: string[],\n disabledPurposeIds: string[],\n enabledVendorIds: string[],\n disabledVendorIds: string[]\n ): Promise<boolean> =>\n RNDidomi.setUserConsentStatus(\n enabledPurposeIds,\n disabledPurposeIds,\n enabledVendorIds,\n disabledVendorIds\n ),\n\n /**\n * Method that allows to disable consent and legitimate interest for all the required purposes and vendors.\n * @returns: **true** if consent status has been updated, **false** otherwise.\n */\n setUserDisagreeToAll: (): Promise<boolean> => RNDidomi.setUserDisagreeToAll(),\n\n /**\n * Set user's choices for purposes and vendors for the current regulation.\n * @param currentUserStatus: instance of CurrentUserStatus containing the user's choices.\n * @returns: **true** if user status has been updated, **false** otherwise.\n */\n setCurrentUserStatus: (\n currentUserStatus: CurrentUserStatus\n ): Promise<boolean> => {\n const jsonString = JSON.stringify(currentUserStatus);\n return RNDidomi.setCurrentUserStatus(jsonString)\n },\n\n /**\n * Set the user status for purposes and vendors for consent and legitimate interest.\n * @param purposesConsentStatus: boolean used to determine if consent will be enabled or disabled for all purposes.\n * @param purposesLIStatus: boolean used to determine if legitimate interest will be enabled or disabled for all purposes.\n * @param vendorsConsentStatus: boolean used to determine if consent will be enabled or disabled for all vendors.\n * @param vendorsLIStatus: boolean used to determine if legitimate interest will be enabled or disabled for all vendors.\n * @returns: **true** if consent status has been updated, **false** otherwise.\n */\n setUserStatus: (\n purposesConsentStatus: boolean,\n purposesLIStatus: boolean,\n vendorsConsentStatus: boolean,\n vendorsLIStatus: boolean\n ): Promise<boolean> =>\n RNDidomi.setUserStatus(\n purposesConsentStatus,\n purposesLIStatus,\n vendorsConsentStatus,\n vendorsLIStatus\n ),\n\n /**\n * Set the user status for purposes and vendors for consent and legitimate interest.\n * @param enabledConsentPurposeIds: List of purpose IDs to enable for consent.\n * @param disabledConsentPurposeIds: List of purpose IDs to disable for consent.\n * @param enabledLIPurposeIds: List of purpose IDs to enable for LI.\n * @param disabledLIPurposeIds: List of purpose IDs to disable for LI.\n * @param enabledConsentVendorIds: List of vendor IDs to enable for consent.\n * @param disabledConsentVendorIds: List of vendor IDs to disable for consent.\n * @param enabledLIVendorIds: List of vendor IDs to enable for LI.\n * @param disabledLIVendorIds: List of vendor IDs to disable for LI.\n */\n setUserStatusSets: (\n enabledConsentPurposeIds: string[],\n disabledConsentPurposeIds: string[],\n enabledLIPurposeIds: string[],\n disabledLIPurposeIds: string[],\n enabledConsentVendorIds: string[],\n disabledConsentVendorIds: string[],\n enabledLIVendorIds: string[],\n disabledLIVendorIds: string[]\n ): Promise<boolean> =>\n RNDidomi.setUserStatusSets(\n enabledConsentPurposeIds,\n disabledConsentPurposeIds,\n enabledLIPurposeIds,\n disabledLIPurposeIds,\n enabledConsentVendorIds,\n disabledConsentVendorIds,\n enabledLIVendorIds,\n disabledLIVendorIds\n ),\n\n /**\n * Check if the consent should be collected depending on if we have any consents or if we have some consents but the number of days before displaying the notice again has not expired yet\n * @returns: A boolean depending if the consent should be collected or not\n * @deprecated use {@link #shouldUserStatusBeCollected()} instead.\n */\n shouldConsentBeCollected: (): Promise<boolean> =>\n RNDidomi.shouldConsentBeCollected(),\n\n /**\n * Method used to update the selected language of the Didomi SDK and any property that depends on it.\n * In most cases this method doesn't need to be called. It would only be required for those apps that allow language change on-the-fly, i.e.: from within the app rather than from the device settings.\n * In order to update the language of the views displayed by the Didomi SDK, this method needs to be called before these views are displayed.\n * @param languageCode: string containing the language code e.g.: \"es\", \"fr\", etc.\n */\n updateSelectedLanguage: (languageCode: string): Promise<void> =>\n RNDidomi.updateSelectedLanguage(languageCode),\n};\n"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,eAAA,GAAAD,OAAA;AAEA,IAAAE,UAAA,GAAAF,OAAA;AAEA,MAAM;EAAEG,MAAM,EAAEC;AAAS,CAAC,GAAGC,0BAAa;AAEnC,MAAMF,MAAM,GAAAG,OAAA,CAAAH,MAAA,GAAG;EACpB;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EACEI,UAAU,EAAEA,CACVC,MAAc,EACdC,sBAA+B,EAC/BC,sBAA+B,EAC/BC,UAAmB,EACnBC,yBAAkC,GAAG,KAAK,EAC1CC,YAAqB,EACrBC,QAAiB,EACjBC,iBAA0B,EAC1BC,gBAAyB,GAAG,KAAK,KACf;IAClB;IACAC,8BAAc,CAACC,IAAI,CAAC,CAAC;;IAErB;IACA,OAAOd,QAAQ,CAACG,UAAU,CACxBY,iCAAsB,EACtBC,yBAAc,EACdZ,MAAM,EACNC,sBAAsB,EACtBC,sBAAsB,EACtBC,UAAU,E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,IAC3CT,QAAQ,CAAC0H,sBAAsB,CAACjH,YAAY;AAChD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["DidomiEventType","exports"],"sources":["DidomiTypes.ts"],"sourcesContent":["// TODO\nexport enum DidomiEventType {\n // Consent\n CONSENT_CHANGED = \"on_consent_changed\",\n // SDK lifecycle events\n ERROR = \"on_error\",\n READY = \"on_ready\",\n // Notice\n HIDE_NOTICE = \"on_hide_notice\",\n SHOW_NOTICE = \"on_show_notice\",\n NOTICE_CLICK_AGREE = \"on_notice_click_agree\",\n NOTICE_CLICK_DISAGREE = \"on_notice_click_disagree\",\n NOTICE_CLICK_VIEW_VENDORS = \"on_notice_click_view_vendors\",\n NOTICE_CLICK_VIEW_SPI_PURPOSES = \"on_notice_click_view_spi_purposes\",\n NOTICE_CLICK_MORE_INFO = \"on_notice_click_more_info\",\n NOTICE_CLICK_PRIVACY_POLICY = \"on_notice_click_privacy_policy\",\n // Preferences\n HIDE_PREFERENCES = \"on_hide_preferences\",\n SHOW_PREFERENCES = \"on_show_preferences\",\n // Preferences - Views\n PREFERENCES_CLICK_VIEW_PURPOSES = \"on_preferences_click_view_purposes\",\n PREFERENCES_CLICK_VIEW_VENDORS = \"on_preferences_click_view_vendors\",\n PREFERENCES_CLICK_VIEW_SPI_PURPOSES = \"on_preferences_click_view_spi_purposes\",\n // Preferences - Purpose\n PREFERENCES_CLICK_AGREE_TO_ALL = \"on_preferences_click_agree_to_all\",\n PREFERENCES_CLICK_DISAGREE_TO_ALL = \"on_preferences_click_disagree_to_all\",\n PREFERENCES_CLICK_AGREE_TO_ALL_PURPOSES = \"on_preferences_click_agree_to_all_purposes\",\n PREFERENCES_CLICK_DISAGREE_TO_ALL_PURPOSES = \"on_preferences_click_disagree_to_all_purposes\",\n PREFERENCES_CLICK_RESET_ALL_PURPOSES = \"on_preferences_click_reset_all_purposes\",\n PREFERENCES_CLICK_PURPOSE_AGREE = \"on_preferences_click_purpose_agree\",\n PREFERENCES_CLICK_PURPOSE_DISAGREE = \"on_preferences_click_purpose_disagree\",\n PREFERENCES_CLICK_CATEGORY_AGREE = \"on_preferences_click_category_agree\",\n PREFERENCES_CLICK_CATEGORY_DISAGREE = \"on_preferences_click_category_disagree\",\n PREFERENCES_CLICK_SAVE_CHOICES = \"on_preferences_click_save_choices\",\n // Preferences - Vendor\n PREFERENCES_CLICK_AGREE_TO_ALL_VENDORS = \"on_preferences_click_agree_to_all_vendors\",\n PREFERENCES_CLICK_DISAGREE_TO_ALL_VENDORS = \"on_preferences_click_disagree_to_all_vendors\",\n PREFERENCES_CLICK_VENDOR_AGREE = \"on_preferences_click_vendor_agree\",\n PREFERENCES_CLICK_VENDOR_DISAGREE = \"on_preferences_click_vendor_disagree\",\n PREFERENCES_CLICK_VENDOR_SAVE_CHOICES = \"on_preferences_click_vendor_save_choices\",\n // Preferences - Sensitive Personal Information\n PREFERENCES_CLICK_SPI_PURPOSE_AGREE = \"on_preferences_click_spi_purpose_agree\",\n PREFERENCES_CLICK_SPI_PURPOSE_DISAGREE = \"on_preferences_click_spi_purpose_disagree\",\n PREFERENCES_CLICK_SPI_CATEGORY_AGREE = \"on_preferences_click_spi_category_agree\",\n PREFERENCES_CLICK_SPI_CATEGORY_DISAGREE = \"on_preferences_click_spi_category_disagree\",\n PREFERENCES_CLICK_SPI_PURPOSE_SAVE_CHOICES = \"on_preferences_click_spi_purpose_save_choices\",\n // Sync\n SYNC_DONE = \"on_sync_done\",\n SYNC_ERROR = \"on_sync_error\",\n // Language\n LANGUAGE_UPDATED = \"on_language_updated\",\n LANGUAGE_UPDATE_FAILED = \"on_language_update_failed\",\n}\n\nexport interface Vendor {\n id: string;\n iabId: string\n name: string;\n policyUrl: string;\n urls: VendorUrls[];\n namespace: string;\n namespaces: VendorNamespaces;\n iabVendor: boolean;\n purposeIds: string[];\n flexiblePurposeIds: string[];\n specialPurposeIds: string[];\n legIntPurposeIds: string[];\n specialFeatureIds: string[];\n dataDeclaration: string[];\n dataRetention: VendorDataRetention;\n cookieMaxAgeSeconds: number;\n usesNonCookieAccess: boolean;\n}\n\nexport interface VendorNamespaces {\n iab2: string;\n}\n\nexport interface VendorUrls {\n privacy: string;\n legIntClaim: string;\n langId: string;\n}\n\nexport interface VendorDataRetention {\n stdRetention: number;\n purposes: Map<number>;\n specialPurposes: Map<number>;\n}\n\nexport interface Purpose {\n id: string;\n iabId: string;\n name: string;\n description: string;\n descriptionLegal: string;\n illustrations: string[];\n custom: boolean;\n essential: boolean;\n specialFeature: boolean;\n legitimateInterest: boolean;\n consent: boolean;\n category: PurposeCategory;\n}\n\nexport interface PurposeCategory {\n id: string;\n purposeId: string;\n icon: string;\n type: string;\n name: Map<string>;\n description: Map<string>;\n children: PurposeCategory[];\n}\n\nexport interface Map<T> {\n [index: string]: T;\n [index: number]: T;\n}\n\nexport interface UserStatus {\n purposes: UserStatusPurposes;\n vendors: UserStatusVendors;\n user_id: string;\n created: string;\n updated: string;\n consent_string: string;\n additional_consent: string;\n didomi_dcs: string;\n regulation: string;\n}\n\nexport interface UserStatusPurposes {\n global: UserStatusIds;\n consent: UserStatusIds;\n legitimate_interest: UserStatusIds;\n essential: UserStatusIds;\n}\n\nexport interface UserStatusVendors {\n global: UserStatusIds;\n global_consent: UserStatusIds;\n global_legitimate_interest: UserStatusIds;\n consent: UserStatusIds;\n legitimate_interest: UserStatusIds;\n}\n\nexport interface UserStatusIds {\n disabled: string[];\n enabled: string[];\n}\n"],"mappings":";;;;;;AAAA;AAAA,IACYA,eAAe,GAAAC,OAAA,CAAAD,eAAA,0BAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAA,OAAfA,eAAe;AAAA"}
|
|
1
|
+
{"version":3,"names":["DidomiEventType","exports"],"sources":["DidomiTypes.ts"],"sourcesContent":["// TODO\nexport enum DidomiEventType {\n // Consent\n CONSENT_CHANGED = \"on_consent_changed\",\n // SDK lifecycle events\n ERROR = \"on_error\",\n READY = \"on_ready\",\n // Notice\n HIDE_NOTICE = \"on_hide_notice\",\n SHOW_NOTICE = \"on_show_notice\",\n NOTICE_CLICK_AGREE = \"on_notice_click_agree\",\n NOTICE_CLICK_DISAGREE = \"on_notice_click_disagree\",\n NOTICE_CLICK_VIEW_VENDORS = \"on_notice_click_view_vendors\",\n NOTICE_CLICK_VIEW_SPI_PURPOSES = \"on_notice_click_view_spi_purposes\",\n NOTICE_CLICK_MORE_INFO = \"on_notice_click_more_info\",\n NOTICE_CLICK_PRIVACY_POLICY = \"on_notice_click_privacy_policy\",\n // Preferences\n HIDE_PREFERENCES = \"on_hide_preferences\",\n SHOW_PREFERENCES = \"on_show_preferences\",\n // Preferences - Views\n PREFERENCES_CLICK_VIEW_PURPOSES = \"on_preferences_click_view_purposes\",\n PREFERENCES_CLICK_VIEW_VENDORS = \"on_preferences_click_view_vendors\",\n PREFERENCES_CLICK_VIEW_SPI_PURPOSES = \"on_preferences_click_view_spi_purposes\",\n // Preferences - Purpose\n PREFERENCES_CLICK_AGREE_TO_ALL = \"on_preferences_click_agree_to_all\",\n PREFERENCES_CLICK_DISAGREE_TO_ALL = \"on_preferences_click_disagree_to_all\",\n PREFERENCES_CLICK_AGREE_TO_ALL_PURPOSES = \"on_preferences_click_agree_to_all_purposes\",\n PREFERENCES_CLICK_DISAGREE_TO_ALL_PURPOSES = \"on_preferences_click_disagree_to_all_purposes\",\n PREFERENCES_CLICK_RESET_ALL_PURPOSES = \"on_preferences_click_reset_all_purposes\",\n PREFERENCES_CLICK_PURPOSE_AGREE = \"on_preferences_click_purpose_agree\",\n PREFERENCES_CLICK_PURPOSE_DISAGREE = \"on_preferences_click_purpose_disagree\",\n PREFERENCES_CLICK_CATEGORY_AGREE = \"on_preferences_click_category_agree\",\n PREFERENCES_CLICK_CATEGORY_DISAGREE = \"on_preferences_click_category_disagree\",\n PREFERENCES_CLICK_SAVE_CHOICES = \"on_preferences_click_save_choices\",\n // Preferences - Vendor\n PREFERENCES_CLICK_AGREE_TO_ALL_VENDORS = \"on_preferences_click_agree_to_all_vendors\",\n PREFERENCES_CLICK_DISAGREE_TO_ALL_VENDORS = \"on_preferences_click_disagree_to_all_vendors\",\n PREFERENCES_CLICK_VENDOR_AGREE = \"on_preferences_click_vendor_agree\",\n PREFERENCES_CLICK_VENDOR_DISAGREE = \"on_preferences_click_vendor_disagree\",\n PREFERENCES_CLICK_VENDOR_SAVE_CHOICES = \"on_preferences_click_vendor_save_choices\",\n // Preferences - Sensitive Personal Information\n PREFERENCES_CLICK_SPI_PURPOSE_AGREE = \"on_preferences_click_spi_purpose_agree\",\n PREFERENCES_CLICK_SPI_PURPOSE_DISAGREE = \"on_preferences_click_spi_purpose_disagree\",\n PREFERENCES_CLICK_SPI_CATEGORY_AGREE = \"on_preferences_click_spi_category_agree\",\n PREFERENCES_CLICK_SPI_CATEGORY_DISAGREE = \"on_preferences_click_spi_category_disagree\",\n PREFERENCES_CLICK_SPI_PURPOSE_SAVE_CHOICES = \"on_preferences_click_spi_purpose_save_choices\",\n // Sync\n SYNC_DONE = \"on_sync_done\",\n SYNC_ERROR = \"on_sync_error\",\n // Language\n LANGUAGE_UPDATED = \"on_language_updated\",\n LANGUAGE_UPDATE_FAILED = \"on_language_update_failed\",\n}\n\nexport interface Vendor {\n id: string;\n iabId: string\n name: string;\n policyUrl: string;\n urls: VendorUrls[];\n namespace: string;\n namespaces: VendorNamespaces;\n iabVendor: boolean;\n purposeIds: string[];\n flexiblePurposeIds: string[];\n specialPurposeIds: string[];\n legIntPurposeIds: string[];\n specialFeatureIds: string[];\n dataDeclaration: string[];\n dataRetention: VendorDataRetention;\n cookieMaxAgeSeconds: number;\n usesNonCookieAccess: boolean;\n}\n\nexport interface VendorNamespaces {\n iab2: string;\n}\n\nexport interface VendorUrls {\n privacy: string;\n legIntClaim: string;\n langId: string;\n}\n\nexport interface VendorDataRetention {\n stdRetention: number;\n purposes: Map<number>;\n specialPurposes: Map<number>;\n}\n\nexport interface Purpose {\n id: string;\n iabId: string;\n name: string;\n description: string;\n descriptionLegal: string;\n illustrations: string[];\n custom: boolean;\n essential: boolean;\n specialFeature: boolean;\n legitimateInterest: boolean;\n consent: boolean;\n category: PurposeCategory;\n}\n\nexport interface PurposeCategory {\n id: string;\n purposeId: string;\n icon: string;\n type: string;\n name: Map<string>;\n description: Map<string>;\n children: PurposeCategory[];\n}\n\nexport interface Map<T> {\n [index: string]: T;\n [index: number]: T;\n}\n\nexport interface UserStatus {\n purposes: UserStatusPurposes;\n vendors: UserStatusVendors;\n user_id: string;\n created: string;\n updated: string;\n consent_string: string;\n additional_consent: string;\n didomi_dcs: string;\n regulation: string;\n}\n\nexport interface UserStatusPurposes {\n global: UserStatusIds;\n consent: UserStatusIds;\n legitimate_interest: UserStatusIds;\n essential: UserStatusIds;\n}\n\nexport interface UserStatusVendors {\n global: UserStatusIds;\n global_consent: UserStatusIds;\n global_legitimate_interest: UserStatusIds;\n consent: UserStatusIds;\n legitimate_interest: UserStatusIds;\n}\n\nexport interface UserStatusIds {\n disabled: string[];\n enabled: string[];\n}\n\nexport interface CurrentUserStatus {\n purposes: Map<PurposeStatus>;\n vendors: Map<VendorStatus>;\n user_id: string;\n created: string;\n updated: string;\n consent_string: string;\n addtl_consent: string;\n didomi_dcs: string;\n regulation: string;\n}\n\nexport interface PurposeStatus {\n id: string;\n enabled: boolean;\n}\n\nexport interface VendorStatus {\n id: string;\n enabled: boolean;\n}\n"],"mappings":";;;;;;AAAA;AAAA,IACYA,eAAe,GAAAC,OAAA,CAAAD,eAAA,0BAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAA,OAAfA,eAAe;AAAA"}
|
package/lib/commonjs/index.js
CHANGED
|
@@ -3,6 +3,12 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
+
Object.defineProperty(exports, "CurrentUserStatus", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function () {
|
|
9
|
+
return _DidomiTypes.CurrentUserStatus;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
6
12
|
Object.defineProperty(exports, "Didomi", {
|
|
7
13
|
enumerable: true,
|
|
8
14
|
get: function () {
|
|
@@ -27,6 +33,12 @@ Object.defineProperty(exports, "PurposeCategory", {
|
|
|
27
33
|
return _DidomiTypes.PurposeCategory;
|
|
28
34
|
}
|
|
29
35
|
});
|
|
36
|
+
Object.defineProperty(exports, "PurposeStatus", {
|
|
37
|
+
enumerable: true,
|
|
38
|
+
get: function () {
|
|
39
|
+
return _DidomiTypes.PurposeStatus;
|
|
40
|
+
}
|
|
41
|
+
});
|
|
30
42
|
Object.defineProperty(exports, "UserStatus", {
|
|
31
43
|
enumerable: true,
|
|
32
44
|
get: function () {
|
|
@@ -63,6 +75,12 @@ Object.defineProperty(exports, "VendorNamespaces", {
|
|
|
63
75
|
return _DidomiTypes.VendorNamespaces;
|
|
64
76
|
}
|
|
65
77
|
});
|
|
78
|
+
Object.defineProperty(exports, "VendorStatus", {
|
|
79
|
+
enumerable: true,
|
|
80
|
+
get: function () {
|
|
81
|
+
return _DidomiTypes.VendorStatus;
|
|
82
|
+
}
|
|
83
|
+
});
|
|
66
84
|
var _Didomi = require("./Didomi");
|
|
67
85
|
var _DidomiTypes = require("./DidomiTypes");
|
|
68
86
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_Didomi","require","_DidomiTypes"],"sources":["index.tsx"],"sourcesContent":["export { Didomi } from './Didomi';\nexport { DidomiEventType, Vendor, VendorNamespaces, Purpose, PurposeCategory, UserStatus, UserStatusPurposes, UserStatusVendors, UserStatusIds } from './DidomiTypes';\n"],"mappings":"
|
|
1
|
+
{"version":3,"names":["_Didomi","require","_DidomiTypes"],"sources":["index.tsx"],"sourcesContent":["export { Didomi } from './Didomi';\nexport { DidomiEventType, Vendor, VendorNamespaces, Purpose, PurposeCategory, UserStatus, UserStatusPurposes, UserStatusVendors, UserStatusIds, CurrentUserStatus, PurposeStatus, VendorStatus } from './DidomiTypes';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA"}
|
package/lib/module/Constants.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["DIDOMI_USER_AGENT_NAME","DIDOMI_VERSION"],"sources":["Constants.ts"],"sourcesContent":["// User agent name\nexport const DIDOMI_USER_AGENT_NAME = \"Didomi React-Native SDK\"\n// User agent version\nexport const DIDOMI_VERSION = \"1.
|
|
1
|
+
{"version":3,"names":["DIDOMI_USER_AGENT_NAME","DIDOMI_VERSION"],"sources":["Constants.ts"],"sourcesContent":["// User agent name\nexport const DIDOMI_USER_AGENT_NAME = \"Didomi React-Native SDK\"\n// User agent version\nexport const DIDOMI_VERSION = \"1.26.0\"\n"],"mappings":"AAAA;AACA,OAAO,MAAMA,sBAAsB,GAAG,yBAAyB;AAC/D;AACA,OAAO,MAAMC,cAAc,GAAG,QAAQ"}
|
package/lib/module/Didomi.js
CHANGED
|
@@ -258,6 +258,11 @@ export const Didomi = {
|
|
|
258
258
|
* getUserStatus().vendors.global_legitimate_interest.disabled.
|
|
259
259
|
*/
|
|
260
260
|
getUserLegitimateInterestStatusForVendorAndRequiredPurposes: vendorId => RNDidomi.getUserLegitimateInterestStatusForVendorAndRequiredPurposes(vendorId),
|
|
261
|
+
/**
|
|
262
|
+
* Get the current user consent status.
|
|
263
|
+
* @returns: status that represents current user consent.
|
|
264
|
+
*/
|
|
265
|
+
getCurrentUserStatus: () => RNDidomi.getCurrentUserStatus(),
|
|
261
266
|
/**
|
|
262
267
|
* Get the user consent status.
|
|
263
268
|
* @returns: status that represents user consent.
|
|
@@ -294,11 +299,24 @@ export const Didomi = {
|
|
|
294
299
|
* @returns: **true** if consent is required, **false** if it is not required.
|
|
295
300
|
*/
|
|
296
301
|
isConsentRequired: () => RNDidomi.isConsentRequired(),
|
|
302
|
+
/**
|
|
303
|
+
* Determine if user status should be collected for the user.
|
|
304
|
+
* Returns **true** if user status is required for the current user and regulation, and one of the following two conditions is met:
|
|
305
|
+
* - User status has never been collected for this user yet
|
|
306
|
+
* - New user status should be collected (as new vendors have been added) AND the number of days before recollecting them has exceeded
|
|
307
|
+
* @returns: **true** if user status should be collected according to these rules, **false** otherwise.
|
|
308
|
+
*/
|
|
309
|
+
shouldUserStatusBeCollected: () => RNDidomi.shouldUserStatusBeCollected(),
|
|
297
310
|
/**
|
|
298
311
|
* Determine if consent information is available for all purposes and vendors that are required
|
|
299
312
|
* @returns: **true** if consent is required and consent information is available, **false** otherwise.
|
|
300
313
|
*/
|
|
301
314
|
isUserConsentStatusPartial: () => RNDidomi.isUserConsentStatusPartial(),
|
|
315
|
+
/**
|
|
316
|
+
* Determine if user did not express a choice for any purpose or vendor that is required
|
|
317
|
+
* @returns: **true** if user choice is required and a choice is not expressed, **false** otherwise.
|
|
318
|
+
*/
|
|
319
|
+
isUserStatusPartial: () => RNDidomi.isUserStatusPartial(),
|
|
302
320
|
/**
|
|
303
321
|
* Check if the consent notice is currently displayed
|
|
304
322
|
* @returns: **true** if the notice is displayed, **false** if is not.
|
|
@@ -432,6 +450,15 @@ export const Didomi = {
|
|
|
432
450
|
* @returns: **true** if consent status has been updated, **false** otherwise.
|
|
433
451
|
*/
|
|
434
452
|
setUserDisagreeToAll: () => RNDidomi.setUserDisagreeToAll(),
|
|
453
|
+
/**
|
|
454
|
+
* Set user's choices for purposes and vendors for the current regulation.
|
|
455
|
+
* @param currentUserStatus: instance of CurrentUserStatus containing the user's choices.
|
|
456
|
+
* @returns: **true** if user status has been updated, **false** otherwise.
|
|
457
|
+
*/
|
|
458
|
+
setCurrentUserStatus: currentUserStatus => {
|
|
459
|
+
const jsonString = JSON.stringify(currentUserStatus);
|
|
460
|
+
return RNDidomi.setCurrentUserStatus(jsonString);
|
|
461
|
+
},
|
|
435
462
|
/**
|
|
436
463
|
* Set the user status for purposes and vendors for consent and legitimate interest.
|
|
437
464
|
* @param purposesConsentStatus: boolean used to determine if consent will be enabled or disabled for all purposes.
|
|
@@ -456,6 +483,7 @@ export const Didomi = {
|
|
|
456
483
|
/**
|
|
457
484
|
* Check if the consent should be collected depending on if we have any consents or if we have some consents but the number of days before displaying the notice again has not expired yet
|
|
458
485
|
* @returns: A boolean depending if the consent should be collected or not
|
|
486
|
+
* @deprecated use {@link #shouldUserStatusBeCollected()} instead.
|
|
459
487
|
*/
|
|
460
488
|
shouldConsentBeCollected: () => RNDidomi.shouldConsentBeCollected(),
|
|
461
489
|
/**
|
package/lib/module/Didomi.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["NativeModules","DidomiListener","DIDOMI_USER_AGENT_NAME","DIDOMI_VERSION","Didomi","RNDidomi","initialize","apiKey","localConfigurationPath","remoteConfigurationUrl","providerId","disableDidomiRemoteConfig","languageCode","noticeId","androidTvNoticeId","androidTvEnabled","init","onReady","promise","setOnReadyListener","onError","setOnErrorListener","setupUI","setLogLevel","level","addEventListener","eventType","callback","removeEventListener","removeAllEventListeners","reset","getDisabledPurposes","getDisabledPurposeIds","getDisabledVendors","getDisabledVendorIds","getEnabledPurposes","getEnabledPurposeIds","getEnabledVendors","getEnabledVendorIds","getJavaScriptForWebView","extra","getQueryStringForWebView","getPurpose","purposeId","getRequiredPurposes","getRequiredPurposeIds","getRequiredVendors","getRequiredVendorIds","getText","key","getTranslatedText","getUserConsentStatusForPurpose","getUserConsentStatusForVendor","vendorId","getUserConsentStatusForVendorAndRequiredPurposes","getUserLegitimateInterestStatusForPurpose","getUserLegitimateInterestForVendor","getUserLegitimateInterestStatusForVendor","getUserLegitimateInterestStatusForVendorAndRequiredPurposes","getUserStatus","getUserStatusForVendor","getVendor","hideNotice","hidePreferences","isConsentRequired","isUserConsentStatusPartial","isNoticeVisible","isPreferencesVisible","isError","isReady","clearUser","setUser","id","algorithm","secretId","salt","digest","setUserAndSetupUI","setUserWithHashAuth","expiration","undefined","setUserWithHashAuthWithExpiration","setUserWithHashAuthAndSetupUI","setUserWithHashAuthWithExpirationAndSetupUI","setUserWithEncryptionAuth","initializationVector","setUserWithEncryptionAuthWithExpiration","setUserWithEncryptionAuthAndSetupUI","setUserWithEncryptionAuthWithExpirationAndSetupUI","showNotice","showPreferences","view","setUserAgreeToAll","setUserConsentStatus","enabledPurposeIds","disabledPurposeIds","enabledVendorIds","disabledVendorIds","setUserDisagreeToAll","setUserStatus","purposesConsentStatus","purposesLIStatus","vendorsConsentStatus","vendorsLIStatus","setUserStatusSets","enabledConsentPurposeIds","disabledConsentPurposeIds","enabledLIPurposeIds","disabledLIPurposeIds","enabledConsentVendorIds","disabledConsentVendorIds","enabledLIVendorIds","disabledLIVendorIds","shouldConsentBeCollected","updateSelectedLanguage"],"sources":["Didomi.ts"],"sourcesContent":["import { NativeModules } from 'react-native';\nimport { DidomiListener } from './DidomiListener';\nimport { DidomiEventType, Purpose, UserStatus, Vendor } from './DidomiTypes';\nimport { DIDOMI_USER_AGENT_NAME, DIDOMI_VERSION } from './Constants';\n\nconst { Didomi: RNDidomi } = NativeModules;\n\nexport const Didomi = {\n /**\n * Initialize the Didomi SDK\n *\n * @param apiKey: Public API key of the organization from the Didomi Console.\n * @param localConfigurationPath: Path to your local config file. Defaults to didomi_config.json if null.\n * @param remoteConfigurationURL: URL to a remote configuration file to load during initialization. This parameter is not used yet. Set it to null for now.\n * @param providerId: Your provider ID (if any).\n * @param disableDidomiRemoteConfig: Whether to disable loading the remote configuration from the Didomi config. Keep this to \"false\" for loading configuration from the Didomi Console.\n * @param languageCode: Language in which the consent UI should be displayed. By default, the consent UI is displayed in the language configured in the device settings. This property allows you to override the default setting and specify a language to display the UI in. String containing the language code e.g.: \"es\", \"fr\", etc.\n * @param noticeId: Notice id for the remote configuration.\n * @param androidTvNoticeId: Notice id for the remote configuration when running on Android TV device (ignored on iOS / tvOS). Note that using remote configuration is mandatory for TV devices.\n * @param androidTvEnabled: Whether to allow Didomi SDK to run on Android TV, default to \"false\".\n */\n initialize: (\n apiKey: string,\n localConfigurationPath?: string,\n remoteConfigurationUrl?: string,\n providerId?: string,\n disableDidomiRemoteConfig: boolean = false,\n languageCode?: string,\n noticeId?: string,\n androidTvNoticeId?: string,\n androidTvEnabled: boolean = false\n ): Promise<void> => {\n // Init listener\n DidomiListener.init();\n\n // Trigger native SDK init\n return RNDidomi.initialize(\n DIDOMI_USER_AGENT_NAME,\n DIDOMI_VERSION,\n apiKey,\n localConfigurationPath,\n remoteConfigurationUrl,\n providerId,\n disableDidomiRemoteConfig,\n languageCode,\n noticeId,\n androidTvNoticeId,\n androidTvEnabled\n );\n },\n\n /**\n * Listen to SDK ready state\n */\n onReady: (): Promise<void> => {\n var promise = DidomiListener.setOnReadyListener();\n RNDidomi.onReady();\n return promise;\n },\n\n /**\n * Listen to SDK errors\n */\n onError: (): Promise<void> => {\n var promise = DidomiListener.setOnErrorListener();\n RNDidomi.onError();\n return promise;\n },\n\n /**\n * Provide the objects required to display UI elements\n */\n setupUI: (): Promise<void> => RNDidomi.setupUI(),\n\n /**\n * Set the minimum level of messages to log\n * You can decide what level of messages should be logged by the SDK by calling the setLogLevel function before initialize\n *\n * Messages with a level below `minLevel` will not be logged.\n *\n * For iOS:\n * Levels are standard levels from `OSLogType` (https://developer.apple.com/documentation/os/logging/choosing_the_log_level_for_a_message):\n * - OSLogType.info (1)\n * - OSLogType.debug (2)\n * - OSLogType.error (16)\n * - OSLogType.fault (17)\n *\n * We recommend setting `OSLogType.error` (16) in production\n *\n * For Android:\n * Use the standard log levels supported by android.util.Log: VERBOSE, DEBUG, INFO, WARN and ERROR.\n * (https://developer.android.com/reference/android/util/Log#constants_1)\n *\n * We recommend setting `Log.INFO` (4) in production\n *\n * @param minLevel: Minimum level of messages to log\n */\n setLogLevel: (level: number): Promise<void> => RNDidomi.setLogLevel(level),\n\n /**\n * Add an event listener\n * @param listener:\n */\n addEventListener: (\n eventType: DidomiEventType,\n callback: (data: any) => void\n ) => DidomiListener.addEventListener(eventType, callback),\n\n /**\n * Remove an event listener\n * @param listener:\n */\n removeEventListener: (\n eventType: DidomiEventType,\n callback: (data: any) => void\n ) => DidomiListener.removeEventListener(eventType, callback),\n\n /**\n * Remove all event listeners\n */\n removeAllEventListeners: () => DidomiListener.reset(),\n\n /**\n * Method used to get an array of disabled purposes.\n * @returns: array of disabled purposes.\n * @deprecated use {@link #getUserStatus()} instead. The result of this method\n * has been replaced by getUserStatus().purposes.consent.disabled.\n */\n getDisabledPurposes: (): Promise<Purpose[]> => RNDidomi.getDisabledPurposes(),\n\n /**\n * Method used to get a set of disabled purpose IDs.\n * @returns: set that contains the IDs of disabled purposes.\n * @deprecated use {@link #getUserStatus()} instead. The result of this method\n * has been replaced by getUserStatus().purposes.consent.enabled.\n */\n getDisabledPurposeIds: (): Promise<string[]> => RNDidomi.getDisabledPurposeIds(),\n\n /**\n * Method used to get an array of disabled vendors.\n * @returns: array of disabled vendors.\n * @deprecated use {@link #getUserStatus()} instead. The result of this method\n * has been replaced by getUserStatus().vendors.consent.disabled.\n */\n getDisabledVendors: (): Promise<Vendor[]> => RNDidomi.getDisabledVendors(),\n\n /**\n * Method used to get a set of disabled vendor IDs.\n * @returns: set that contains the IDs of disabled vendors.\n * @deprecated use {@link #getUserStatus()} instead. The result of this method\n * has been replaced by getUserStatus().vendors.consent.disabled.\n */\n getDisabledVendorIds: (): Promise<string[]> => RNDidomi.getDisabledVendorIds(),\n\n /**\n * Method used to get an array of enabled purposes.\n * @returns: array of enabled purposes.\n * @deprecated use {@link #getUserStatus()} instead. The result of this method\n * has been replaced by getUserStatus().purposes.consent.enabled.\n */\n getEnabledPurposes: (): Promise<Purpose[]> => RNDidomi.getEnabledPurposes(),\n\n /**\n * Method used to get a set of enabled purpose IDs.\n * @returns: set that contains the IDs of enabled purposes.\n * @deprecated use {@link #getUserStatus()} instead. The result of this method\n * has been replaced by getUserStatus().purposes.consent.enabled.\n */\n getEnabledPurposeIds: (): Promise<string[]> => RNDidomi.getEnabledPurposeIds(),\n\n /**\n * Method used to get an array of enabled vendors.\n * @returns: array of enabled vendors.\n * @deprecated use {@link #getUserStatus()} instead. The result of this method\n * has been replaced by getUserStatus().vendors.consent.enabled.\n */\n getEnabledVendors: (): Promise<Vendor[]> => RNDidomi.getEnabledVendors(),\n\n /**\n * Method used to get a set of enabled vendor IDs.\n * @returns: set that contains the IDs of enabled vendors.\n * @deprecated use {@link #getUserStatus()} instead. The result of this method\n * has been replaced by getUserStatus().vendors.consent.enabled.\n */\n getEnabledVendorIds: (): Promise<string[]> => RNDidomi.getEnabledVendorIds(),\n\n /**\n * Get JavaScript to embed into a WebView to pass the consent status from the app\n * to the Didomi Web SDK embedded into the WebView\n * Inject the returned JavaScript into a WebView\n * @param extra: Extra JavaScript to inject in the returned code\n * @returns: JavaScript code to inject in a WebView\n */\n getJavaScriptForWebView: (extra?: string | null): Promise<string> => RNDidomi.getJavaScriptForWebView(extra),\n\n getQueryStringForWebView: (): Promise<string> => RNDidomi.getQueryStringForWebView(),\n\n /**\n * Method used to get a Purpose based on its ID.\n * @param purposeId: purpose ID used in the search.\n * @returns: purpose found in the array.\n */\n getPurpose: (purposeId: string): Promise<Purpose> => RNDidomi.getPurpose(purposeId),\n\n /**\n * Method used to get an array of required purposes.\n *\n * @returns: array of required purposes.\n */\n getRequiredPurposes: (): Promise<Purpose[]> => RNDidomi.getRequiredPurposes(),\n\n /**\n * Get the configured purpose IDs\n * @returns: set of purpose IDs.\n */\n getRequiredPurposeIds: (): Promise<string[]> => RNDidomi.getRequiredPurposeIds(),\n\n /**\n * Method used to get an array of required vendors.\n * @returns: array of required vendors.\n */\n getRequiredVendors: (): Promise<Vendor[]> => RNDidomi.getRequiredVendors(),\n\n /**\n * Get the configured vendor IDs\n * @returns: set of vendor IDs.\n */\n getRequiredVendorIds: (): Promise<string[]> => RNDidomi.getRequiredVendorIds(),\n\n /**\n * Method used to get a dictionary/map in the form of { \"en\": \"Key in English\", \"fr\": \"Key in French.\" }\n * for a given key.\n * @param key: used to find its corresponding value in the dictionary/map.\n * @returns: dictionary containing the different translations for a given key.\n */\n getText: (key: string): Promise<any[]> => RNDidomi.getText(key),\n\n /**\n * Method used to get a translated text based on the key being passed.\n * The language and the source of this translated text will depend on the availability of the translation for the specific key.\n * The language being used will be either the selected language of the SDK (based on device Locale and other parameters) or the language specified by app developers as the default language being used by the SDK. The source can be either the `didomi_config.json` file which can be either local or remote, or the `didomi_master_config.json` file which is bundled within the SDK.\n *\n * These are the attempts performed by the SDK to try to find a translation for the specific key:\n * - Get translated value in user locale (selected language) from `didomi_config.json` (either local or remote).\n * - Get translated value in default locale (from the config) from `didomi_config.json` (either local or remote).\n * - Get translated value in user locale (selected language) from `didomi_master_config.json` (bundled within the Didomi SDK).\n * - Get translated value in default locale (from the config) from `didomi_master_config.json` (bundled within the Didomi SDK).\n *\n * If no translation can be found after these 4 attempts, the key will be returned.\n *\n * App developers can provide these translated texts through the `didomi_config.json` file (locally or remotely) in 3 different ways:\n * - Custom texts for the consent notice: https://developers.didomi.io/cmp/mobile-sdk/consent-notice/customize-the-notice#texts\n * - Custom texts for the preferences: https://developers.didomi.io/cmp/mobile-sdk/consent-notice/customize-the-preferences-popup#text\n * - Custom texts for custom notices: https://developers.didomi.io/cmp/mobile-sdk/consent-notice/customize-the-theme#translatable-texts-for-custom-notices\n *\n * @param key: used to find its corresponding value in one of the different sources.\n * @returns: a translated string if a translation was found, the same key that was passed otherwise.\n */\n getTranslatedText: (key: string): Promise<string> => RNDidomi.getTranslatedText(key),\n\n /**\n * Get the user consent status for a specific purpose\n * @param purposeId: The purpose ID to check consent for\n * @returns: The user consent status for the specified purpose\n * @deprecated use {@link #getUserStatus()} instead. Search the purposeId in\n * getUserStatus().purposes.consent.enabled or\n * getUserStatus().purposes.consent.enabled.\n */\n getUserConsentStatusForPurpose: (purposeId: string): Promise<boolean> => RNDidomi.getUserConsentStatusForPurpose(purposeId),\n\n /**\n * Get the user consent status for a specific vendor\n * @param vendorId: The vendor ID to check consent for\n * @returns: The user consent status for the specified vendor\n * @deprecated use {@link #getUserStatus()} instead. Search the vendorId in\n * getUserStatus().vendors.consent.enabled or\n * getUserStatus().vendors.consent.disabled.\n */\n getUserConsentStatusForVendor: (vendorId: string): Promise<boolean> => RNDidomi.getUserConsentStatusForVendor(vendorId),\n\n /**\n * Get the user consent status for a specific vendor and all its purposes\n * @param vendorId: The ID of the vendor\n * @returns: The user consent status corresponding to the specified vendor and all its required purposes.\n * @deprecated use {@link #getUserStatus()} instead. The result of this method has been replaced\n * by getUserStatus().vendors.global_consent.enabled or\n * getUserStatus().vendors.global_consent.disabled.\n */\n getUserConsentStatusForVendorAndRequiredPurposes: (vendorId: string): Promise<boolean> => RNDidomi.getUserConsentStatusForVendorAndRequiredPurposes(vendorId),\n\n /**\n * Get the user legitimate interest status for a specific purpose.\n * @param purposeId: purpose ID.\n * @returns: LI status of a purpose.\n * @deprecated use {@link #getUserStatus()} instead. Search the purposeId in\n * getUserStatus().purposes.consent.enabled or\n * getUserStatus().purposes.consent.enabled.\n */\n getUserLegitimateInterestStatusForPurpose: (purposeId: string): Promise<boolean> => RNDidomi.getUserLegitimateInterestStatusForPurpose(purposeId),\n\n /**\n * Get the user legitimate interest status for a specific vendor.\n * @param vendorId: vendor ID.\n * @returns: LI status of a vendor.\n * @deprecated use {@link #getUserStatus()} instead. Search the vendorId in\n * getUserStatus().vendors.legitimate_interest.enabled or\n * getUserStatus().vendors.legitimate_interest.disabled.\n */\n getUserLegitimateInterestForVendor: (vendorId: string): Promise<boolean> => RNDidomi.getUserLegitimateInterestStatusForVendor(vendorId),\n\n /**\n * Get the user LI status for a specific vendor and all its purposes.\n * @param vendorId: vendor ID.\n * @returns: The user LI status corresponding to the specified vendor and all its required purposes.\n * @deprecated use {@link #getUserStatus()} instead. Search the purposeId in\n * getUserStatus().vendors.global_legitimate_interest.enabled or\n * getUserStatus().vendors.global_legitimate_interest.disabled.\n */\n getUserLegitimateInterestStatusForVendorAndRequiredPurposes: (vendorId: string): boolean => RNDidomi.getUserLegitimateInterestStatusForVendorAndRequiredPurposes(vendorId),\n\n /**\n * Get the user consent status.\n * @returns: status that represents user consent.\n */\n getUserStatus: (): Promise<UserStatus> => RNDidomi.getUserStatus(),\n\n /**\n * Get the user consent and legitimate interest status for a specific vendor.\n * @param vendorId: vendor ID.\n * @returns: status that represents both consent and legitimate interest status of a vendor.\n * @deprecated use {@link #getUserStatus()} instead. Search the vendorId in\n * getUserStatus().vendors.global.enabled or\n * getUserStatus().vendors.global.disabled.\n */\n getUserStatusForVendor: (vendorId: string): Promise<boolean> => RNDidomi.getUserStatusForVendor(vendorId),\n\n /**\n * Method used to get a Vendor based on its ID.\n * @param vendorId: vendor ID used in the search.\n * @returns: vendor found in the array.\n */\n getVendor: (vendorId: string): Promise<Vendor> => RNDidomi.getVendor(vendorId),\n\n /**\n * Hide the notice if it is currently displayed\n */\n hideNotice: (): Promise<void> => RNDidomi.hideNotice(),\n\n /**\n * Hide the preferences popup for purposes\n */\n hidePreferences: (): Promise<void> => RNDidomi.hidePreferences(),\n\n /**\n * Determine if consent is required for the user. The rules are (OR):\n * - The user country is in the EU.\n * - The company is from the EU.\n * - The user country is unknown and the app has chosen to collect consent when unknown.\n * @returns: **true** if consent is required, **false** if it is not required.\n */\n isConsentRequired: (): Promise<boolean> => RNDidomi.isConsentRequired(),\n\n /**\n * Determine if consent information is available for all purposes and vendors that are required\n * @returns: **true** if consent is required and consent information is available, **false** otherwise.\n */\n isUserConsentStatusPartial: (): Promise<boolean> => RNDidomi.isUserConsentStatusPartial(),\n\n /**\n * Check if the consent notice is currently displayed\n * @returns: **true** if the notice is displayed, **false** if is not.\n */\n isNoticeVisible: (): Promise<boolean> => RNDidomi.isNoticeVisible(),\n\n /**\n * Method used to check if the Preferences view is visible.\n * @returns: **true** if Preferences view is visible, **false** otherwise.\n */\n isPreferencesVisible: (): Promise<boolean> => RNDidomi.isPreferencesVisible(),\n\n isError: (): Promise<boolean> => RNDidomi.isError(),\n\n /**\n * Is the Didomi SDK ready?\n */\n isReady: (): Promise<boolean> => RNDidomi.isReady(),\n\n /**\n * Clear user information\n */\n clearUser: (): Promise<void> => RNDidomi.clearUser(),\n\n /**\n * Set user information without authentication\n *\n * @param id Organization user ID\n * @param algorithm Deprecated. To set user with authentication, use setUserWithHashAuth or setUserWithEncryptionAuth.\n * @param secretId Deprecated. To set user with authentication, use setUserWithHashAuth or setUserWithEncryptionAuth.\n * @param salt Deprecated. To set user with authentication, use setUserWithHashAuth or setUserWithEncryptionAuth.\n * @param digest Deprecated. To set user with authentication, use setUserWithHashAuth or setUserWithEncryptionAuth.\n */\n setUser: (\n id: string,\n algorithm?: string,\n secretId?: string,\n salt?: string,\n digest?: string\n ): Promise<void> =>\n RNDidomi.setUser(\n id,\n algorithm,\n secretId,\n salt,\n digest\n ),\n\n /**\n * Set user information without authentication and check for missing consent\n *\n * @param id Organization user ID\n */\n setUserAndSetupUI: (id: string): Promise<void> => RNDidomi.setUserAndSetupUI(id),\n\n /**\n * Set user information with Hash authentication\n *\n * @param id Organization user ID\n * @param algorithm Algorithm used for computing the digest\n * @param secretId ID of the secret used for computing the digest\n * @param digest Digest of the organization user ID and secret\n * @param salt Salt used for computing the digest (optional)\n * @param expiration Expiration date as timestamp (to prevent replay attacks)\n */\n setUserWithHashAuth: (\n id: string,\n algorithm: string,\n secretId: string,\n digest: string,\n salt?: string,\n expiration?: BigInt\n ): void => {\n if (expiration === undefined) {\n RNDidomi.setUserWithHashAuth(\n id,\n algorithm,\n secretId,\n digest,\n salt\n );\n } else {\n RNDidomi.setUserWithHashAuthWithExpiration(\n id,\n algorithm,\n secretId,\n digest,\n salt,\n expiration\n );\n }\n },\n\n /**\n * Set user information with Hash authentication and check for missing consent\n *\n * @param id Organization user ID\n * @param algorithm Algorithm used for computing the digest\n * @param secretId ID of the secret used for computing the digest\n * @param digest Digest of the organization user ID and secret\n * @param salt Salt used for computing the digest (optional)\n * @param expiration Expiration date as timestamp (to prevent replay attacks)\n */\n setUserWithHashAuthAndSetupUI: (\n id: string,\n algorithm: string,\n secretId: string,\n digest: string,\n salt?: string,\n expiration?: BigInt\n ): void => {\n if (expiration === undefined) {\n RNDidomi.setUserWithHashAuthAndSetupUI(\n id,\n algorithm,\n secretId,\n digest,\n salt\n );\n } else {\n RNDidomi.setUserWithHashAuthWithExpirationAndSetupUI(\n id,\n algorithm,\n secretId,\n digest,\n salt,\n expiration\n );\n }\n },\n\n /**\n * Set user information with Encryption authentication\n *\n * @param id Organization user ID\n * @param algorithm Algorithm used for computing the digest\n * @param secretId ID of the secret used for computing the digest\n * @param initializationVector Initialization Vector used for computing the user ID\n * @param expiration Expiration date as timestamp (to prevent replay attacks)\n */\n setUserWithEncryptionAuth: (\n id: string,\n algorithm: string,\n secretId: string,\n initializationVector: string,\n expiration?: BigInt\n ): void => {\n if (expiration === undefined) {\n RNDidomi.setUserWithEncryptionAuth(\n id,\n algorithm,\n secretId,\n initializationVector\n );\n } else {\n RNDidomi.setUserWithEncryptionAuthWithExpiration(\n id,\n algorithm,\n secretId,\n initializationVector,\n expiration\n );\n }\n },\n\n /**\n * Set user information with Encryption authentication and check for missing consent\n *\n * @param id Organization user ID\n * @param algorithm Algorithm used for computing the digest\n * @param secretId ID of the secret used for computing the digest\n * @param initializationVector Initialization Vector used for computing the user ID\n * @param expiration Expiration date as timestamp (to prevent replay attacks)\n */\n setUserWithEncryptionAuthAndSetupUI: (\n id: string,\n algorithm: string,\n secretId: string,\n initializationVector: string,\n expiration?: BigInt\n ): void => {\n if (expiration === undefined) {\n RNDidomi.setUserWithEncryptionAuthAndSetupUI(\n id,\n algorithm,\n secretId,\n initializationVector\n );\n } else {\n RNDidomi.setUserWithEncryptionAuthWithExpirationAndSetupUI(\n id,\n algorithm,\n secretId,\n initializationVector,\n expiration\n );\n }\n },\n\n /**\n * Show the consent notice (if required, not disabled in the config and not already displayed)\n */\n showNotice: (): Promise<void> => RNDidomi.showNotice(),\n\n /**\n * Show the preferences screen when/if the SDK is ready. By default the purposes list will be displayed.\n * @param view: It can be `purposes` or `vendors`\n */\n showPreferences: (view?: string): Promise<void> => RNDidomi.showPreferences(view),\n\n /**\n * Remove all consents for the user\n */\n reset: (): Promise<void> => RNDidomi.reset(),\n\n /**\n * Method that allows to enable consent and legitimate interest for all the required purposes.\n * @returns: **true** if consent status has been updated, **false** otherwise.\n */\n setUserAgreeToAll: (): Promise<boolean> => RNDidomi.setUserAgreeToAll(),\n\n /**\n * Set the user consent status.\n * @param enabledPurposeIds: set containing **enabled purpose ids**\n * @param disabledPurposeIds: set containing **disabled purpose ids**\n * @param enabledVendorIds: set containing **enabled vendor ids**\n * @param disabledVendorIds: set containing **disabled purpose ids**\n * @returns: **true** if consent status has been updated, **false** otherwise.\n */\n setUserConsentStatus: (\n enabledPurposeIds: string[],\n disabledPurposeIds: string[],\n enabledVendorIds: string[],\n disabledVendorIds: string[]\n ): Promise<boolean> =>\n RNDidomi.setUserConsentStatus(\n enabledPurposeIds,\n disabledPurposeIds,\n enabledVendorIds,\n disabledVendorIds\n ),\n\n /**\n * Method that allows to disable consent and legitimate interest for all the required purposes and vendors.\n * @returns: **true** if consent status has been updated, **false** otherwise.\n */\n setUserDisagreeToAll: (): Promise<boolean> => RNDidomi.setUserDisagreeToAll(),\n\n /**\n * Set the user status for purposes and vendors for consent and legitimate interest.\n * @param purposesConsentStatus: boolean used to determine if consent will be enabled or disabled for all purposes.\n * @param purposesLIStatus: boolean used to determine if legitimate interest will be enabled or disabled for all purposes.\n * @param vendorsConsentStatus: boolean used to determine if consent will be enabled or disabled for all vendors.\n * @param vendorsLIStatus: boolean used to determine if legitimate interest will be enabled or disabled for all vendors.\n * @returns: **true** if consent status has been updated, **false** otherwise.\n */\n setUserStatus: (\n purposesConsentStatus: boolean,\n purposesLIStatus: boolean,\n vendorsConsentStatus: boolean,\n vendorsLIStatus: boolean\n ): Promise<boolean> =>\n RNDidomi.setUserStatus(\n purposesConsentStatus,\n purposesLIStatus,\n vendorsConsentStatus,\n vendorsLIStatus\n ),\n\n /**\n * Set the user status for purposes and vendors for consent and legitimate interest.\n * @param enabledConsentPurposeIds: List of purpose IDs to enable for consent.\n * @param disabledConsentPurposeIds: List of purpose IDs to disable for consent.\n * @param enabledLIPurposeIds: List of purpose IDs to enable for LI.\n * @param disabledLIPurposeIds: List of purpose IDs to disable for LI.\n * @param enabledConsentVendorIds: List of vendor IDs to enable for consent.\n * @param disabledConsentVendorIds: List of vendor IDs to disable for consent.\n * @param enabledLIVendorIds: List of vendor IDs to enable for LI.\n * @param disabledLIVendorIds: List of vendor IDs to disable for LI.\n */\n setUserStatusSets: (\n enabledConsentPurposeIds: string[],\n disabledConsentPurposeIds: string[],\n enabledLIPurposeIds: string[],\n disabledLIPurposeIds: string[],\n enabledConsentVendorIds: string[],\n disabledConsentVendorIds: string[],\n enabledLIVendorIds: string[],\n disabledLIVendorIds: string[]\n ): Promise<boolean> =>\n RNDidomi.setUserStatusSets(\n enabledConsentPurposeIds,\n disabledConsentPurposeIds,\n enabledLIPurposeIds,\n disabledLIPurposeIds,\n enabledConsentVendorIds,\n disabledConsentVendorIds,\n enabledLIVendorIds,\n disabledLIVendorIds\n ),\n\n /**\n * Check if the consent should be collected depending on if we have any consents or if we have some consents but the number of days before displaying the notice again has not expired yet\n * @returns: A boolean depending if the consent should be collected or not\n */\n shouldConsentBeCollected: (): Promise<boolean> =>\n RNDidomi.shouldConsentBeCollected(),\n\n /**\n * Method used to update the selected language of the Didomi SDK and any property that depends on it.\n * In most cases this method doesn't need to be called. It would only be required for those apps that allow language change on-the-fly, i.e.: from within the app rather than from the device settings.\n * In order to update the language of the views displayed by the Didomi SDK, this method needs to be called before these views are displayed.\n * @param languageCode: string containing the language code e.g.: \"es\", \"fr\", etc.\n */\n updateSelectedLanguage: (languageCode: string): Promise<void> =>\n RNDidomi.updateSelectedLanguage(languageCode),\n};\n"],"mappings":"AAAA,SAASA,aAAa,QAAQ,cAAc;AAC5C,SAASC,cAAc,QAAQ,kBAAkB;AAEjD,SAASC,sBAAsB,EAAEC,cAAc,QAAQ,aAAa;AAEpE,MAAM;EAAEC,MAAM,EAAEC;AAAS,CAAC,GAAGL,aAAa;AAE1C,OAAO,MAAMI,MAAM,GAAG;EACpB;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA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EA,CAAA,KAAwBvF,QAAQ,CAACuF,iBAAiB,CAAC,CAAC;EAEvE;AACF;AACA;AACA;AACA;AACA;AACA;AACA;EACEC,oBAAoB,EAAEA,CACpBC,iBAA2B,EAC3BC,kBAA4B,EAC5BC,gBAA0B,EAC1BC,iBAA2B,KAE3B5F,QAAQ,CAACwF,oBAAoB,CAC3BC,iBAAiB,EACjBC,kBAAkB,EAClBC,gBAAgB,EAChBC,iBACF,CAAC;EAEH;AACF;AACA;AACA;EACEC,oBAAoB,EAAEA,CAAA,KAAwB7F,QAAQ,CAAC6F,oBAAoB,CAAC,CAAC;EAE7E;AACF;AACA;AACA;AACA;AACA;AACA;AACA;EACEC,aAAa,EAAEA,CACbC,qBAA8B,EAC9BC,gBAAyB,EACzBC,oBAA6B,EAC7BC,eAAwB,KAExBlG,QAAQ,CAAC8F,aAAa,CACpBC,qBAAqB,EACrBC,gBAAgB,EAChBC,oBAAoB,EACpBC,eACF,CAAC;EAEH;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EACEC,iBAAiB,EAAEA,CACjBC,wBAAkC,EAClCC,yBAAmC,EACnCC,mBAA6B,EAC7BC,oBAA8B,EAC9BC,uBAAiC,EACjCC,wBAAkC,EAClCC,kBAA4B,EAC5BC,mBAA6B,KAE7B3G,QAAQ,CAACmG,iBAAiB,CACxBC,wBAAwB,EACxBC,yBAAyB,EACzBC,mBAAmB,EACnBC,oBAAoB,EACpBC,uBAAuB,EACvBC,wBAAwB,EACxBC,kBAAkB,EAClBC,mBACF,CAAC;EAEH;AACF;AACA;AACA;EACEC,wBAAwB,EAAEA,CAAA,KACxB5G,QAAQ,CAAC4G,wBAAwB,CAAC,CAAC;EAErC;AACF;AACA;AACA;AACA;AACA;EACEC,sBAAsB,EAAGtG,YAAoB,IAC3CP,QAAQ,CAAC6G,sBAAsB,CAACtG,YAAY;AAChD,CAAC"}
|
|
1
|
+
{"version":3,"names":["NativeModules","DidomiListener","DIDOMI_USER_AGENT_NAME","DIDOMI_VERSION","Didomi","RNDidomi","initialize","apiKey","localConfigurationPath","remoteConfigurationUrl","providerId","disableDidomiRemoteConfig","languageCode","noticeId","androidTvNoticeId","androidTvEnabled","init","onReady","promise","setOnReadyListener","onError","setOnErrorListener","setupUI","setLogLevel","level","addEventListener","eventType","callback","removeEventListener","removeAllEventListeners","reset","getDisabledPurposes","getDisabledPurposeIds","getDisabledVendors","getDisabledVendorIds","getEnabledPurposes","getEnabledPurposeIds","getEnabledVendors","getEnabledVendorIds","getJavaScriptForWebView","extra","getQueryStringForWebView","getPurpose","purposeId","getRequiredPurposes","getRequiredPurposeIds","getRequiredVendors","getRequiredVendorIds","getText","key","getTranslatedText","getUserConsentStatusForPurpose","getUserConsentStatusForVendor","vendorId","getUserConsentStatusForVendorAndRequiredPurposes","getUserLegitimateInterestStatusForPurpose","getUserLegitimateInterestForVendor","getUserLegitimateInterestStatusForVendor","getUserLegitimateInterestStatusForVendorAndRequiredPurposes","getCurrentUserStatus","getUserStatus","getUserStatusForVendor","getVendor","hideNotice","hidePreferences","isConsentRequired","shouldUserStatusBeCollected","isUserConsentStatusPartial","isUserStatusPartial","isNoticeVisible","isPreferencesVisible","isError","isReady","clearUser","setUser","id","algorithm","secretId","salt","digest","setUserAndSetupUI","setUserWithHashAuth","expiration","undefined","setUserWithHashAuthWithExpiration","setUserWithHashAuthAndSetupUI","setUserWithHashAuthWithExpirationAndSetupUI","setUserWithEncryptionAuth","initializationVector","setUserWithEncryptionAuthWithExpiration","setUserWithEncryptionAuthAndSetupUI","setUserWithEncryptionAuthWithExpirationAndSetupUI","showNotice","showPreferences","view","setUserAgreeToAll","setUserConsentStatus","enabledPurposeIds","disabledPurposeIds","enabledVendorIds","disabledVendorIds","setUserDisagreeToAll","setCurrentUserStatus","currentUserStatus","jsonString","JSON","stringify","setUserStatus","purposesConsentStatus","purposesLIStatus","vendorsConsentStatus","vendorsLIStatus","setUserStatusSets","enabledConsentPurposeIds","disabledConsentPurposeIds","enabledLIPurposeIds","disabledLIPurposeIds","enabledConsentVendorIds","disabledConsentVendorIds","enabledLIVendorIds","disabledLIVendorIds","shouldConsentBeCollected","updateSelectedLanguage"],"sources":["Didomi.ts"],"sourcesContent":["import { NativeModules } from 'react-native';\nimport { DidomiListener } from './DidomiListener';\nimport { DidomiEventType, Purpose, Vendor, UserStatus, CurrentUserStatus } from './DidomiTypes';\nimport { DIDOMI_USER_AGENT_NAME, DIDOMI_VERSION } from './Constants';\n\nconst { Didomi: RNDidomi } = NativeModules;\n\nexport const Didomi = {\n /**\n * Initialize the Didomi SDK\n *\n * @param apiKey: Public API key of the organization from the Didomi Console.\n * @param localConfigurationPath: Path to your local config file. Defaults to didomi_config.json if null.\n * @param remoteConfigurationURL: URL to a remote configuration file to load during initialization. This parameter is not used yet. Set it to null for now.\n * @param providerId: Your provider ID (if any).\n * @param disableDidomiRemoteConfig: Whether to disable loading the remote configuration from the Didomi config. Keep this to \"false\" for loading configuration from the Didomi Console.\n * @param languageCode: Language in which the consent UI should be displayed. By default, the consent UI is displayed in the language configured in the device settings. This property allows you to override the default setting and specify a language to display the UI in. String containing the language code e.g.: \"es\", \"fr\", etc.\n * @param noticeId: Notice id for the remote configuration.\n * @param androidTvNoticeId: Notice id for the remote configuration when running on Android TV device (ignored on iOS / tvOS). Note that using remote configuration is mandatory for TV devices.\n * @param androidTvEnabled: Whether to allow Didomi SDK to run on Android TV, default to \"false\".\n */\n initialize: (\n apiKey: string,\n localConfigurationPath?: string,\n remoteConfigurationUrl?: string,\n providerId?: string,\n disableDidomiRemoteConfig: boolean = false,\n languageCode?: string,\n noticeId?: string,\n androidTvNoticeId?: string,\n androidTvEnabled: boolean = false\n ): Promise<void> => {\n // Init listener\n DidomiListener.init();\n\n // Trigger native SDK init\n return RNDidomi.initialize(\n DIDOMI_USER_AGENT_NAME,\n DIDOMI_VERSION,\n apiKey,\n localConfigurationPath,\n remoteConfigurationUrl,\n providerId,\n disableDidomiRemoteConfig,\n languageCode,\n noticeId,\n androidTvNoticeId,\n androidTvEnabled\n );\n },\n\n /**\n * Listen to SDK ready state\n */\n onReady: (): Promise<void> => {\n var promise = DidomiListener.setOnReadyListener();\n RNDidomi.onReady();\n return promise;\n },\n\n /**\n * Listen to SDK errors\n */\n onError: (): Promise<void> => {\n var promise = DidomiListener.setOnErrorListener();\n RNDidomi.onError();\n return promise;\n },\n\n /**\n * Provide the objects required to display UI elements\n */\n setupUI: (): Promise<void> => RNDidomi.setupUI(),\n\n /**\n * Set the minimum level of messages to log\n * You can decide what level of messages should be logged by the SDK by calling the setLogLevel function before initialize\n *\n * Messages with a level below `minLevel` will not be logged.\n *\n * For iOS:\n * Levels are standard levels from `OSLogType` (https://developer.apple.com/documentation/os/logging/choosing_the_log_level_for_a_message):\n * - OSLogType.info (1)\n * - OSLogType.debug (2)\n * - OSLogType.error (16)\n * - OSLogType.fault (17)\n *\n * We recommend setting `OSLogType.error` (16) in production\n *\n * For Android:\n * Use the standard log levels supported by android.util.Log: VERBOSE, DEBUG, INFO, WARN and ERROR.\n * (https://developer.android.com/reference/android/util/Log#constants_1)\n *\n * We recommend setting `Log.INFO` (4) in production\n *\n * @param minLevel: Minimum level of messages to log\n */\n setLogLevel: (level: number): Promise<void> => RNDidomi.setLogLevel(level),\n\n /**\n * Add an event listener\n * @param listener:\n */\n addEventListener: (\n eventType: DidomiEventType,\n callback: (data: any) => void\n ) => DidomiListener.addEventListener(eventType, callback),\n\n /**\n * Remove an event listener\n * @param listener:\n */\n removeEventListener: (\n eventType: DidomiEventType,\n callback: (data: any) => void\n ) => DidomiListener.removeEventListener(eventType, callback),\n\n /**\n * Remove all event listeners\n */\n removeAllEventListeners: () => DidomiListener.reset(),\n\n /**\n * Method used to get an array of disabled purposes.\n * @returns: array of disabled purposes.\n * @deprecated use {@link #getUserStatus()} instead. The result of this method\n * has been replaced by getUserStatus().purposes.consent.disabled.\n */\n getDisabledPurposes: (): Promise<Purpose[]> => RNDidomi.getDisabledPurposes(),\n\n /**\n * Method used to get a set of disabled purpose IDs.\n * @returns: set that contains the IDs of disabled purposes.\n * @deprecated use {@link #getUserStatus()} instead. The result of this method\n * has been replaced by getUserStatus().purposes.consent.enabled.\n */\n getDisabledPurposeIds: (): Promise<string[]> => RNDidomi.getDisabledPurposeIds(),\n\n /**\n * Method used to get an array of disabled vendors.\n * @returns: array of disabled vendors.\n * @deprecated use {@link #getUserStatus()} instead. The result of this method\n * has been replaced by getUserStatus().vendors.consent.disabled.\n */\n getDisabledVendors: (): Promise<Vendor[]> => RNDidomi.getDisabledVendors(),\n\n /**\n * Method used to get a set of disabled vendor IDs.\n * @returns: set that contains the IDs of disabled vendors.\n * @deprecated use {@link #getUserStatus()} instead. The result of this method\n * has been replaced by getUserStatus().vendors.consent.disabled.\n */\n getDisabledVendorIds: (): Promise<string[]> => RNDidomi.getDisabledVendorIds(),\n\n /**\n * Method used to get an array of enabled purposes.\n * @returns: array of enabled purposes.\n * @deprecated use {@link #getUserStatus()} instead. The result of this method\n * has been replaced by getUserStatus().purposes.consent.enabled.\n */\n getEnabledPurposes: (): Promise<Purpose[]> => RNDidomi.getEnabledPurposes(),\n\n /**\n * Method used to get a set of enabled purpose IDs.\n * @returns: set that contains the IDs of enabled purposes.\n * @deprecated use {@link #getUserStatus()} instead. The result of this method\n * has been replaced by getUserStatus().purposes.consent.enabled.\n */\n getEnabledPurposeIds: (): Promise<string[]> => RNDidomi.getEnabledPurposeIds(),\n\n /**\n * Method used to get an array of enabled vendors.\n * @returns: array of enabled vendors.\n * @deprecated use {@link #getUserStatus()} instead. The result of this method\n * has been replaced by getUserStatus().vendors.consent.enabled.\n */\n getEnabledVendors: (): Promise<Vendor[]> => RNDidomi.getEnabledVendors(),\n\n /**\n * Method used to get a set of enabled vendor IDs.\n * @returns: set that contains the IDs of enabled vendors.\n * @deprecated use {@link #getUserStatus()} instead. The result of this method\n * has been replaced by getUserStatus().vendors.consent.enabled.\n */\n getEnabledVendorIds: (): Promise<string[]> => RNDidomi.getEnabledVendorIds(),\n\n /**\n * Get JavaScript to embed into a WebView to pass the consent status from the app\n * to the Didomi Web SDK embedded into the WebView\n * Inject the returned JavaScript into a WebView\n * @param extra: Extra JavaScript to inject in the returned code\n * @returns: JavaScript code to inject in a WebView\n */\n getJavaScriptForWebView: (extra?: string | null): Promise<string> => RNDidomi.getJavaScriptForWebView(extra),\n\n getQueryStringForWebView: (): Promise<string> => RNDidomi.getQueryStringForWebView(),\n\n /**\n * Method used to get a Purpose based on its ID.\n * @param purposeId: purpose ID used in the search.\n * @returns: purpose found in the array.\n */\n getPurpose: (purposeId: string): Promise<Purpose> => RNDidomi.getPurpose(purposeId),\n\n /**\n * Method used to get an array of required purposes.\n *\n * @returns: array of required purposes.\n */\n getRequiredPurposes: (): Promise<Purpose[]> => RNDidomi.getRequiredPurposes(),\n\n /**\n * Get the configured purpose IDs\n * @returns: set of purpose IDs.\n */\n getRequiredPurposeIds: (): Promise<string[]> => RNDidomi.getRequiredPurposeIds(),\n\n /**\n * Method used to get an array of required vendors.\n * @returns: array of required vendors.\n */\n getRequiredVendors: (): Promise<Vendor[]> => RNDidomi.getRequiredVendors(),\n\n /**\n * Get the configured vendor IDs\n * @returns: set of vendor IDs.\n */\n getRequiredVendorIds: (): Promise<string[]> => RNDidomi.getRequiredVendorIds(),\n\n /**\n * Method used to get a dictionary/map in the form of { \"en\": \"Key in English\", \"fr\": \"Key in French.\" }\n * for a given key.\n * @param key: used to find its corresponding value in the dictionary/map.\n * @returns: dictionary containing the different translations for a given key.\n */\n getText: (key: string): Promise<any[]> => RNDidomi.getText(key),\n\n /**\n * Method used to get a translated text based on the key being passed.\n * The language and the source of this translated text will depend on the availability of the translation for the specific key.\n * The language being used will be either the selected language of the SDK (based on device Locale and other parameters) or the language specified by app developers as the default language being used by the SDK. The source can be either the `didomi_config.json` file which can be either local or remote, or the `didomi_master_config.json` file which is bundled within the SDK.\n *\n * These are the attempts performed by the SDK to try to find a translation for the specific key:\n * - Get translated value in user locale (selected language) from `didomi_config.json` (either local or remote).\n * - Get translated value in default locale (from the config) from `didomi_config.json` (either local or remote).\n * - Get translated value in user locale (selected language) from `didomi_master_config.json` (bundled within the Didomi SDK).\n * - Get translated value in default locale (from the config) from `didomi_master_config.json` (bundled within the Didomi SDK).\n *\n * If no translation can be found after these 4 attempts, the key will be returned.\n *\n * App developers can provide these translated texts through the `didomi_config.json` file (locally or remotely) in 3 different ways:\n * - Custom texts for the consent notice: https://developers.didomi.io/cmp/mobile-sdk/consent-notice/customize-the-notice#texts\n * - Custom texts for the preferences: https://developers.didomi.io/cmp/mobile-sdk/consent-notice/customize-the-preferences-popup#text\n * - Custom texts for custom notices: https://developers.didomi.io/cmp/mobile-sdk/consent-notice/customize-the-theme#translatable-texts-for-custom-notices\n *\n * @param key: used to find its corresponding value in one of the different sources.\n * @returns: a translated string if a translation was found, the same key that was passed otherwise.\n */\n getTranslatedText: (key: string): Promise<string> => RNDidomi.getTranslatedText(key),\n\n /**\n * Get the user consent status for a specific purpose\n * @param purposeId: The purpose ID to check consent for\n * @returns: The user consent status for the specified purpose\n * @deprecated use {@link #getUserStatus()} instead. Search the purposeId in\n * getUserStatus().purposes.consent.enabled or\n * getUserStatus().purposes.consent.enabled.\n */\n getUserConsentStatusForPurpose: (purposeId: string): Promise<boolean> => RNDidomi.getUserConsentStatusForPurpose(purposeId),\n\n /**\n * Get the user consent status for a specific vendor\n * @param vendorId: The vendor ID to check consent for\n * @returns: The user consent status for the specified vendor\n * @deprecated use {@link #getUserStatus()} instead. Search the vendorId in\n * getUserStatus().vendors.consent.enabled or\n * getUserStatus().vendors.consent.disabled.\n */\n getUserConsentStatusForVendor: (vendorId: string): Promise<boolean> => RNDidomi.getUserConsentStatusForVendor(vendorId),\n\n /**\n * Get the user consent status for a specific vendor and all its purposes\n * @param vendorId: The ID of the vendor\n * @returns: The user consent status corresponding to the specified vendor and all its required purposes.\n * @deprecated use {@link #getUserStatus()} instead. The result of this method has been replaced\n * by getUserStatus().vendors.global_consent.enabled or\n * getUserStatus().vendors.global_consent.disabled.\n */\n getUserConsentStatusForVendorAndRequiredPurposes: (vendorId: string): Promise<boolean> => RNDidomi.getUserConsentStatusForVendorAndRequiredPurposes(vendorId),\n\n /**\n * Get the user legitimate interest status for a specific purpose.\n * @param purposeId: purpose ID.\n * @returns: LI status of a purpose.\n * @deprecated use {@link #getUserStatus()} instead. Search the purposeId in\n * getUserStatus().purposes.consent.enabled or\n * getUserStatus().purposes.consent.enabled.\n */\n getUserLegitimateInterestStatusForPurpose: (purposeId: string): Promise<boolean> => RNDidomi.getUserLegitimateInterestStatusForPurpose(purposeId),\n\n /**\n * Get the user legitimate interest status for a specific vendor.\n * @param vendorId: vendor ID.\n * @returns: LI status of a vendor.\n * @deprecated use {@link #getUserStatus()} instead. Search the vendorId in\n * getUserStatus().vendors.legitimate_interest.enabled or\n * getUserStatus().vendors.legitimate_interest.disabled.\n */\n getUserLegitimateInterestForVendor: (vendorId: string): Promise<boolean> => RNDidomi.getUserLegitimateInterestStatusForVendor(vendorId),\n\n /**\n * Get the user LI status for a specific vendor and all its purposes.\n * @param vendorId: vendor ID.\n * @returns: The user LI status corresponding to the specified vendor and all its required purposes.\n * @deprecated use {@link #getUserStatus()} instead. Search the purposeId in\n * getUserStatus().vendors.global_legitimate_interest.enabled or\n * getUserStatus().vendors.global_legitimate_interest.disabled.\n */\n getUserLegitimateInterestStatusForVendorAndRequiredPurposes: (vendorId: string): boolean => RNDidomi.getUserLegitimateInterestStatusForVendorAndRequiredPurposes(vendorId),\n\n /**\n * Get the current user consent status.\n * @returns: status that represents current user consent.\n */\n getCurrentUserStatus: (): Promise<CurrentUserStatus> => RNDidomi.getCurrentUserStatus(),\n\n /**\n * Get the user consent status.\n * @returns: status that represents user consent.\n */\n getUserStatus: (): Promise<UserStatus> => RNDidomi.getUserStatus(),\n\n /**\n * Get the user consent and legitimate interest status for a specific vendor.\n * @param vendorId: vendor ID.\n * @returns: status that represents both consent and legitimate interest status of a vendor.\n * @deprecated use {@link #getUserStatus()} instead. Search the vendorId in\n * getUserStatus().vendors.global.enabled or\n * getUserStatus().vendors.global.disabled.\n */\n getUserStatusForVendor: (vendorId: string): Promise<boolean> => RNDidomi.getUserStatusForVendor(vendorId),\n\n /**\n * Method used to get a Vendor based on its ID.\n * @param vendorId: vendor ID used in the search.\n * @returns: vendor found in the array.\n */\n getVendor: (vendorId: string): Promise<Vendor> => RNDidomi.getVendor(vendorId),\n\n /**\n * Hide the notice if it is currently displayed\n */\n hideNotice: (): Promise<void> => RNDidomi.hideNotice(),\n\n /**\n * Hide the preferences popup for purposes\n */\n hidePreferences: (): Promise<void> => RNDidomi.hidePreferences(),\n\n /**\n * Determine if consent is required for the user. The rules are (OR):\n * - The user country is in the EU.\n * - The company is from the EU.\n * - The user country is unknown and the app has chosen to collect consent when unknown.\n * @returns: **true** if consent is required, **false** if it is not required.\n */\n isConsentRequired: (): Promise<boolean> => RNDidomi.isConsentRequired(),\n\n /**\n * Determine if user status should be collected for the user.\n * Returns **true** if user status is required for the current user and regulation, and one of the following two conditions is met:\n * - User status has never been collected for this user yet\n * - New user status should be collected (as new vendors have been added) AND the number of days before recollecting them has exceeded\n * @returns: **true** if user status should be collected according to these rules, **false** otherwise.\n */\n shouldUserStatusBeCollected: (): Promise<boolean> => RNDidomi.shouldUserStatusBeCollected(),\n\n /**\n * Determine if consent information is available for all purposes and vendors that are required\n * @returns: **true** if consent is required and consent information is available, **false** otherwise.\n */\n isUserConsentStatusPartial: (): Promise<boolean> => RNDidomi.isUserConsentStatusPartial(),\n\n /**\n * Determine if user did not express a choice for any purpose or vendor that is required\n * @returns: **true** if user choice is required and a choice is not expressed, **false** otherwise.\n */\n isUserStatusPartial: (): Promise<boolean> => RNDidomi.isUserStatusPartial(),\n\n /**\n * Check if the consent notice is currently displayed\n * @returns: **true** if the notice is displayed, **false** if is not.\n */\n isNoticeVisible: (): Promise<boolean> => RNDidomi.isNoticeVisible(),\n\n /**\n * Method used to check if the Preferences view is visible.\n * @returns: **true** if Preferences view is visible, **false** otherwise.\n */\n isPreferencesVisible: (): Promise<boolean> => RNDidomi.isPreferencesVisible(),\n\n isError: (): Promise<boolean> => RNDidomi.isError(),\n\n /**\n * Is the Didomi SDK ready?\n */\n isReady: (): Promise<boolean> => RNDidomi.isReady(),\n\n /**\n * Clear user information\n */\n clearUser: (): Promise<void> => RNDidomi.clearUser(),\n\n /**\n * Set user information without authentication\n *\n * @param id Organization user ID\n * @param algorithm Deprecated. To set user with authentication, use setUserWithHashAuth or setUserWithEncryptionAuth.\n * @param secretId Deprecated. To set user with authentication, use setUserWithHashAuth or setUserWithEncryptionAuth.\n * @param salt Deprecated. To set user with authentication, use setUserWithHashAuth or setUserWithEncryptionAuth.\n * @param digest Deprecated. To set user with authentication, use setUserWithHashAuth or setUserWithEncryptionAuth.\n */\n setUser: (\n id: string,\n algorithm?: string,\n secretId?: string,\n salt?: string,\n digest?: string\n ): Promise<void> =>\n RNDidomi.setUser(\n id,\n algorithm,\n secretId,\n salt,\n digest\n ),\n\n /**\n * Set user information without authentication and check for missing consent\n *\n * @param id Organization user ID\n */\n setUserAndSetupUI: (id: string): Promise<void> => RNDidomi.setUserAndSetupUI(id),\n\n /**\n * Set user information with Hash authentication\n *\n * @param id Organization user ID\n * @param algorithm Algorithm used for computing the digest\n * @param secretId ID of the secret used for computing the digest\n * @param digest Digest of the organization user ID and secret\n * @param salt Salt used for computing the digest (optional)\n * @param expiration Expiration date as timestamp (to prevent replay attacks)\n */\n setUserWithHashAuth: (\n id: string,\n algorithm: string,\n secretId: string,\n digest: string,\n salt?: string,\n expiration?: BigInt\n ): void => {\n if (expiration === undefined) {\n RNDidomi.setUserWithHashAuth(\n id,\n algorithm,\n secretId,\n digest,\n salt\n );\n } else {\n RNDidomi.setUserWithHashAuthWithExpiration(\n id,\n algorithm,\n secretId,\n digest,\n salt,\n expiration\n );\n }\n },\n\n /**\n * Set user information with Hash authentication and check for missing consent\n *\n * @param id Organization user ID\n * @param algorithm Algorithm used for computing the digest\n * @param secretId ID of the secret used for computing the digest\n * @param digest Digest of the organization user ID and secret\n * @param salt Salt used for computing the digest (optional)\n * @param expiration Expiration date as timestamp (to prevent replay attacks)\n */\n setUserWithHashAuthAndSetupUI: (\n id: string,\n algorithm: string,\n secretId: string,\n digest: string,\n salt?: string,\n expiration?: BigInt\n ): void => {\n if (expiration === undefined) {\n RNDidomi.setUserWithHashAuthAndSetupUI(\n id,\n algorithm,\n secretId,\n digest,\n salt\n );\n } else {\n RNDidomi.setUserWithHashAuthWithExpirationAndSetupUI(\n id,\n algorithm,\n secretId,\n digest,\n salt,\n expiration\n );\n }\n },\n\n /**\n * Set user information with Encryption authentication\n *\n * @param id Organization user ID\n * @param algorithm Algorithm used for computing the digest\n * @param secretId ID of the secret used for computing the digest\n * @param initializationVector Initialization Vector used for computing the user ID\n * @param expiration Expiration date as timestamp (to prevent replay attacks)\n */\n setUserWithEncryptionAuth: (\n id: string,\n algorithm: string,\n secretId: string,\n initializationVector: string,\n expiration?: BigInt\n ): void => {\n if (expiration === undefined) {\n RNDidomi.setUserWithEncryptionAuth(\n id,\n algorithm,\n secretId,\n initializationVector\n );\n } else {\n RNDidomi.setUserWithEncryptionAuthWithExpiration(\n id,\n algorithm,\n secretId,\n initializationVector,\n expiration\n );\n }\n },\n\n /**\n * Set user information with Encryption authentication and check for missing consent\n *\n * @param id Organization user ID\n * @param algorithm Algorithm used for computing the digest\n * @param secretId ID of the secret used for computing the digest\n * @param initializationVector Initialization Vector used for computing the user ID\n * @param expiration Expiration date as timestamp (to prevent replay attacks)\n */\n setUserWithEncryptionAuthAndSetupUI: (\n id: string,\n algorithm: string,\n secretId: string,\n initializationVector: string,\n expiration?: BigInt\n ): void => {\n if (expiration === undefined) {\n RNDidomi.setUserWithEncryptionAuthAndSetupUI(\n id,\n algorithm,\n secretId,\n initializationVector\n );\n } else {\n RNDidomi.setUserWithEncryptionAuthWithExpirationAndSetupUI(\n id,\n algorithm,\n secretId,\n initializationVector,\n expiration\n );\n }\n },\n\n /**\n * Show the consent notice (if required, not disabled in the config and not already displayed)\n */\n showNotice: (): Promise<void> => RNDidomi.showNotice(),\n\n /**\n * Show the preferences screen when/if the SDK is ready. By default the purposes list will be displayed.\n * @param view: It can be `purposes` or `vendors`\n */\n showPreferences: (view?: string): Promise<void> => RNDidomi.showPreferences(view),\n\n /**\n * Remove all consents for the user\n */\n reset: (): Promise<void> => RNDidomi.reset(),\n\n /**\n * Method that allows to enable consent and legitimate interest for all the required purposes.\n * @returns: **true** if consent status has been updated, **false** otherwise.\n */\n setUserAgreeToAll: (): Promise<boolean> => RNDidomi.setUserAgreeToAll(),\n\n /**\n * Set the user consent status.\n * @param enabledPurposeIds: set containing **enabled purpose ids**\n * @param disabledPurposeIds: set containing **disabled purpose ids**\n * @param enabledVendorIds: set containing **enabled vendor ids**\n * @param disabledVendorIds: set containing **disabled purpose ids**\n * @returns: **true** if consent status has been updated, **false** otherwise.\n */\n setUserConsentStatus: (\n enabledPurposeIds: string[],\n disabledPurposeIds: string[],\n enabledVendorIds: string[],\n disabledVendorIds: string[]\n ): Promise<boolean> =>\n RNDidomi.setUserConsentStatus(\n enabledPurposeIds,\n disabledPurposeIds,\n enabledVendorIds,\n disabledVendorIds\n ),\n\n /**\n * Method that allows to disable consent and legitimate interest for all the required purposes and vendors.\n * @returns: **true** if consent status has been updated, **false** otherwise.\n */\n setUserDisagreeToAll: (): Promise<boolean> => RNDidomi.setUserDisagreeToAll(),\n\n /**\n * Set user's choices for purposes and vendors for the current regulation.\n * @param currentUserStatus: instance of CurrentUserStatus containing the user's choices.\n * @returns: **true** if user status has been updated, **false** otherwise.\n */\n setCurrentUserStatus: (\n currentUserStatus: CurrentUserStatus\n ): Promise<boolean> => {\n const jsonString = JSON.stringify(currentUserStatus);\n return RNDidomi.setCurrentUserStatus(jsonString)\n },\n\n /**\n * Set the user status for purposes and vendors for consent and legitimate interest.\n * @param purposesConsentStatus: boolean used to determine if consent will be enabled or disabled for all purposes.\n * @param purposesLIStatus: boolean used to determine if legitimate interest will be enabled or disabled for all purposes.\n * @param vendorsConsentStatus: boolean used to determine if consent will be enabled or disabled for all vendors.\n * @param vendorsLIStatus: boolean used to determine if legitimate interest will be enabled or disabled for all vendors.\n * @returns: **true** if consent status has been updated, **false** otherwise.\n */\n setUserStatus: (\n purposesConsentStatus: boolean,\n purposesLIStatus: boolean,\n vendorsConsentStatus: boolean,\n vendorsLIStatus: boolean\n ): Promise<boolean> =>\n RNDidomi.setUserStatus(\n purposesConsentStatus,\n purposesLIStatus,\n vendorsConsentStatus,\n vendorsLIStatus\n ),\n\n /**\n * Set the user status for purposes and vendors for consent and legitimate interest.\n * @param enabledConsentPurposeIds: List of purpose IDs to enable for consent.\n * @param disabledConsentPurposeIds: List of purpose IDs to disable for consent.\n * @param enabledLIPurposeIds: List of purpose IDs to enable for LI.\n * @param disabledLIPurposeIds: List of purpose IDs to disable for LI.\n * @param enabledConsentVendorIds: List of vendor IDs to enable for consent.\n * @param disabledConsentVendorIds: List of vendor IDs to disable for consent.\n * @param enabledLIVendorIds: List of vendor IDs to enable for LI.\n * @param disabledLIVendorIds: List of vendor IDs to disable for LI.\n */\n setUserStatusSets: (\n enabledConsentPurposeIds: string[],\n disabledConsentPurposeIds: string[],\n enabledLIPurposeIds: string[],\n disabledLIPurposeIds: string[],\n enabledConsentVendorIds: string[],\n disabledConsentVendorIds: string[],\n enabledLIVendorIds: string[],\n disabledLIVendorIds: string[]\n ): Promise<boolean> =>\n RNDidomi.setUserStatusSets(\n enabledConsentPurposeIds,\n disabledConsentPurposeIds,\n enabledLIPurposeIds,\n disabledLIPurposeIds,\n enabledConsentVendorIds,\n disabledConsentVendorIds,\n enabledLIVendorIds,\n disabledLIVendorIds\n ),\n\n /**\n * Check if the consent should be collected depending on if we have any consents or if we have some consents but the number of days before displaying the notice again has not expired yet\n * @returns: A boolean depending if the consent should be collected or not\n * @deprecated use {@link #shouldUserStatusBeCollected()} instead.\n */\n shouldConsentBeCollected: (): Promise<boolean> =>\n RNDidomi.shouldConsentBeCollected(),\n\n /**\n * Method used to update the selected language of the Didomi SDK and any property that depends on it.\n * In most cases this method doesn't need to be called. It would only be required for those apps that allow language change on-the-fly, i.e.: from within the app rather than from the device settings.\n * In order to update the language of the views displayed by the Didomi SDK, this method needs to be called before these views are displayed.\n * @param languageCode: string containing the language code e.g.: \"es\", \"fr\", etc.\n */\n updateSelectedLanguage: (languageCode: string): Promise<void> =>\n RNDidomi.updateSelectedLanguage(languageCode),\n};\n"],"mappings":"AAAA,SAASA,aAAa,QAAQ,cAAc;AAC5C,SAASC,cAAc,QAAQ,kBAAkB;AAEjD,SAASC,sBAAsB,EAAEC,cAAc,QAAQ,aAAa;AAEpE,MAAM;EAAEC,MAAM,EAAEC;AAAS,CAAC,GAAGL,aAAa;AAE1C,OAAO,MAAMI,MAAM,GAAG;EACpB;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EACEE,UAAU,EAAEA,CACVC,MAAc,EACdC,sBAA+B,EAC/BC,sBAA+B,EAC/BC,UAAmB,EACnBC,yBAAkC,GAAG,KAAK,EAC1CC,YAAqB,EACrBC,QAAiB,EACjBC,iBAA0B,EAC1BC,gBAAyB,GAAG,KAAK,KACf;IAClB;IACAd,cAAc,CAACe,IAAI,CAAC,CAAC;;IAErB;IACA,OAAOX,QAAQ,CAACC,UAAU,CACxBJ,sBAAsB,EACtBC,cAAc,EACdI,MAAM,EACNC,sBAAsB,EACtBC,sBAAsB,EACtBC,UAAU,EACVC,yBAAyB,EACzBC,YAAY,EACZC,QAAQ,EACRC,iBAAiB,EACjBC,gBACF,CAAC;EACH,CAAC;EAED;AACF;AACA;EACEE,OAAO,EAAEA,CAAA,KAAqB;IAC5B,IAAIC,OAAO,GAAGjB,cAAc,CAACkB,kBAAkB,CAAC,CAAC;IACjDd,QAAQ,CAACY,OAAO,CAAC,CAAC;IAClB,OAAOC,OAAO;EAChB,CAAC;EAED;AACF;AACA;EACEE,OAAO,EAAEA,CAAA,KAAqB;IAC5B,IA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AACA;AACA;EACEC,oBAAoB,EAClBC,iBAAoC,IACf;IACrB,MAAMC,UAAU,GAAGC,IAAI,CAACC,SAAS,CAACH,iBAAiB,CAAC;IACpD,OAAOlG,QAAQ,CAACiG,oBAAoB,CAACE,UAAU,CAAC;EAClD,CAAC;EAED;AACF;AACA;AACA;AACA;AACA;AACA;AACA;EACEG,aAAa,EAAEA,CACbC,qBAA8B,EAC9BC,gBAAyB,EACzBC,oBAA6B,EAC7BC,eAAwB,KAExB1G,QAAQ,CAACsG,aAAa,CACpBC,qBAAqB,EACrBC,gBAAgB,EAChBC,oBAAoB,EACpBC,eACF,CAAC;EAEH;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EACEC,iBAAiB,EAAEA,CACjBC,wBAAkC,EAClCC,yBAAmC,EACnCC,mBAA6B,EAC7BC,oBAA8B,EAC9BC,uBAAiC,EACjCC,wBAAkC,EAClCC,kBAA4B,EAC5BC,mBAA6B,KAE7BnH,QAAQ,CAAC2G,iBAAiB,CACxBC,wBAAwB,EACxBC,yBAAyB,EACzBC,mBAAmB,EACnBC,oBAAoB,EACpBC,uBAAuB,EACvBC,wBAAwB,EACxBC,kBAAkB,EAClBC,mBACF,CAAC;EAEH;AACF;AACA;AACA;AACA;EACEC,wBAAwB,EAAEA,CAAA,KACxBpH,QAAQ,CAACoH,wBAAwB,CAAC,CAAC;EAErC;AACF;AACA;AACA;AACA;AACA;EACEC,sBAAsB,EAAG9G,YAAoB,IAC3CP,QAAQ,CAACqH,sBAAsB,CAAC9G,YAAY;AAChD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["DidomiEventType"],"sources":["DidomiTypes.ts"],"sourcesContent":["// TODO\nexport enum DidomiEventType {\n // Consent\n CONSENT_CHANGED = \"on_consent_changed\",\n // SDK lifecycle events\n ERROR = \"on_error\",\n READY = \"on_ready\",\n // Notice\n HIDE_NOTICE = \"on_hide_notice\",\n SHOW_NOTICE = \"on_show_notice\",\n NOTICE_CLICK_AGREE = \"on_notice_click_agree\",\n NOTICE_CLICK_DISAGREE = \"on_notice_click_disagree\",\n NOTICE_CLICK_VIEW_VENDORS = \"on_notice_click_view_vendors\",\n NOTICE_CLICK_VIEW_SPI_PURPOSES = \"on_notice_click_view_spi_purposes\",\n NOTICE_CLICK_MORE_INFO = \"on_notice_click_more_info\",\n NOTICE_CLICK_PRIVACY_POLICY = \"on_notice_click_privacy_policy\",\n // Preferences\n HIDE_PREFERENCES = \"on_hide_preferences\",\n SHOW_PREFERENCES = \"on_show_preferences\",\n // Preferences - Views\n PREFERENCES_CLICK_VIEW_PURPOSES = \"on_preferences_click_view_purposes\",\n PREFERENCES_CLICK_VIEW_VENDORS = \"on_preferences_click_view_vendors\",\n PREFERENCES_CLICK_VIEW_SPI_PURPOSES = \"on_preferences_click_view_spi_purposes\",\n // Preferences - Purpose\n PREFERENCES_CLICK_AGREE_TO_ALL = \"on_preferences_click_agree_to_all\",\n PREFERENCES_CLICK_DISAGREE_TO_ALL = \"on_preferences_click_disagree_to_all\",\n PREFERENCES_CLICK_AGREE_TO_ALL_PURPOSES = \"on_preferences_click_agree_to_all_purposes\",\n PREFERENCES_CLICK_DISAGREE_TO_ALL_PURPOSES = \"on_preferences_click_disagree_to_all_purposes\",\n PREFERENCES_CLICK_RESET_ALL_PURPOSES = \"on_preferences_click_reset_all_purposes\",\n PREFERENCES_CLICK_PURPOSE_AGREE = \"on_preferences_click_purpose_agree\",\n PREFERENCES_CLICK_PURPOSE_DISAGREE = \"on_preferences_click_purpose_disagree\",\n PREFERENCES_CLICK_CATEGORY_AGREE = \"on_preferences_click_category_agree\",\n PREFERENCES_CLICK_CATEGORY_DISAGREE = \"on_preferences_click_category_disagree\",\n PREFERENCES_CLICK_SAVE_CHOICES = \"on_preferences_click_save_choices\",\n // Preferences - Vendor\n PREFERENCES_CLICK_AGREE_TO_ALL_VENDORS = \"on_preferences_click_agree_to_all_vendors\",\n PREFERENCES_CLICK_DISAGREE_TO_ALL_VENDORS = \"on_preferences_click_disagree_to_all_vendors\",\n PREFERENCES_CLICK_VENDOR_AGREE = \"on_preferences_click_vendor_agree\",\n PREFERENCES_CLICK_VENDOR_DISAGREE = \"on_preferences_click_vendor_disagree\",\n PREFERENCES_CLICK_VENDOR_SAVE_CHOICES = \"on_preferences_click_vendor_save_choices\",\n // Preferences - Sensitive Personal Information\n PREFERENCES_CLICK_SPI_PURPOSE_AGREE = \"on_preferences_click_spi_purpose_agree\",\n PREFERENCES_CLICK_SPI_PURPOSE_DISAGREE = \"on_preferences_click_spi_purpose_disagree\",\n PREFERENCES_CLICK_SPI_CATEGORY_AGREE = \"on_preferences_click_spi_category_agree\",\n PREFERENCES_CLICK_SPI_CATEGORY_DISAGREE = \"on_preferences_click_spi_category_disagree\",\n PREFERENCES_CLICK_SPI_PURPOSE_SAVE_CHOICES = \"on_preferences_click_spi_purpose_save_choices\",\n // Sync\n SYNC_DONE = \"on_sync_done\",\n SYNC_ERROR = \"on_sync_error\",\n // Language\n LANGUAGE_UPDATED = \"on_language_updated\",\n LANGUAGE_UPDATE_FAILED = \"on_language_update_failed\",\n}\n\nexport interface Vendor {\n id: string;\n iabId: string\n name: string;\n policyUrl: string;\n urls: VendorUrls[];\n namespace: string;\n namespaces: VendorNamespaces;\n iabVendor: boolean;\n purposeIds: string[];\n flexiblePurposeIds: string[];\n specialPurposeIds: string[];\n legIntPurposeIds: string[];\n specialFeatureIds: string[];\n dataDeclaration: string[];\n dataRetention: VendorDataRetention;\n cookieMaxAgeSeconds: number;\n usesNonCookieAccess: boolean;\n}\n\nexport interface VendorNamespaces {\n iab2: string;\n}\n\nexport interface VendorUrls {\n privacy: string;\n legIntClaim: string;\n langId: string;\n}\n\nexport interface VendorDataRetention {\n stdRetention: number;\n purposes: Map<number>;\n specialPurposes: Map<number>;\n}\n\nexport interface Purpose {\n id: string;\n iabId: string;\n name: string;\n description: string;\n descriptionLegal: string;\n illustrations: string[];\n custom: boolean;\n essential: boolean;\n specialFeature: boolean;\n legitimateInterest: boolean;\n consent: boolean;\n category: PurposeCategory;\n}\n\nexport interface PurposeCategory {\n id: string;\n purposeId: string;\n icon: string;\n type: string;\n name: Map<string>;\n description: Map<string>;\n children: PurposeCategory[];\n}\n\nexport interface Map<T> {\n [index: string]: T;\n [index: number]: T;\n}\n\nexport interface UserStatus {\n purposes: UserStatusPurposes;\n vendors: UserStatusVendors;\n user_id: string;\n created: string;\n updated: string;\n consent_string: string;\n additional_consent: string;\n didomi_dcs: string;\n regulation: string;\n}\n\nexport interface UserStatusPurposes {\n global: UserStatusIds;\n consent: UserStatusIds;\n legitimate_interest: UserStatusIds;\n essential: UserStatusIds;\n}\n\nexport interface UserStatusVendors {\n global: UserStatusIds;\n global_consent: UserStatusIds;\n global_legitimate_interest: UserStatusIds;\n consent: UserStatusIds;\n legitimate_interest: UserStatusIds;\n}\n\nexport interface UserStatusIds {\n disabled: string[];\n enabled: string[];\n}\n"],"mappings":"AAAA;AACA,WAAYA,eAAe,0BAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAA,OAAfA,eAAe;AAAA"}
|
|
1
|
+
{"version":3,"names":["DidomiEventType"],"sources":["DidomiTypes.ts"],"sourcesContent":["// TODO\nexport enum DidomiEventType {\n // Consent\n CONSENT_CHANGED = \"on_consent_changed\",\n // SDK lifecycle events\n ERROR = \"on_error\",\n READY = \"on_ready\",\n // Notice\n HIDE_NOTICE = \"on_hide_notice\",\n SHOW_NOTICE = \"on_show_notice\",\n NOTICE_CLICK_AGREE = \"on_notice_click_agree\",\n NOTICE_CLICK_DISAGREE = \"on_notice_click_disagree\",\n NOTICE_CLICK_VIEW_VENDORS = \"on_notice_click_view_vendors\",\n NOTICE_CLICK_VIEW_SPI_PURPOSES = \"on_notice_click_view_spi_purposes\",\n NOTICE_CLICK_MORE_INFO = \"on_notice_click_more_info\",\n NOTICE_CLICK_PRIVACY_POLICY = \"on_notice_click_privacy_policy\",\n // Preferences\n HIDE_PREFERENCES = \"on_hide_preferences\",\n SHOW_PREFERENCES = \"on_show_preferences\",\n // Preferences - Views\n PREFERENCES_CLICK_VIEW_PURPOSES = \"on_preferences_click_view_purposes\",\n PREFERENCES_CLICK_VIEW_VENDORS = \"on_preferences_click_view_vendors\",\n PREFERENCES_CLICK_VIEW_SPI_PURPOSES = \"on_preferences_click_view_spi_purposes\",\n // Preferences - Purpose\n PREFERENCES_CLICK_AGREE_TO_ALL = \"on_preferences_click_agree_to_all\",\n PREFERENCES_CLICK_DISAGREE_TO_ALL = \"on_preferences_click_disagree_to_all\",\n PREFERENCES_CLICK_AGREE_TO_ALL_PURPOSES = \"on_preferences_click_agree_to_all_purposes\",\n PREFERENCES_CLICK_DISAGREE_TO_ALL_PURPOSES = \"on_preferences_click_disagree_to_all_purposes\",\n PREFERENCES_CLICK_RESET_ALL_PURPOSES = \"on_preferences_click_reset_all_purposes\",\n PREFERENCES_CLICK_PURPOSE_AGREE = \"on_preferences_click_purpose_agree\",\n PREFERENCES_CLICK_PURPOSE_DISAGREE = \"on_preferences_click_purpose_disagree\",\n PREFERENCES_CLICK_CATEGORY_AGREE = \"on_preferences_click_category_agree\",\n PREFERENCES_CLICK_CATEGORY_DISAGREE = \"on_preferences_click_category_disagree\",\n PREFERENCES_CLICK_SAVE_CHOICES = \"on_preferences_click_save_choices\",\n // Preferences - Vendor\n PREFERENCES_CLICK_AGREE_TO_ALL_VENDORS = \"on_preferences_click_agree_to_all_vendors\",\n PREFERENCES_CLICK_DISAGREE_TO_ALL_VENDORS = \"on_preferences_click_disagree_to_all_vendors\",\n PREFERENCES_CLICK_VENDOR_AGREE = \"on_preferences_click_vendor_agree\",\n PREFERENCES_CLICK_VENDOR_DISAGREE = \"on_preferences_click_vendor_disagree\",\n PREFERENCES_CLICK_VENDOR_SAVE_CHOICES = \"on_preferences_click_vendor_save_choices\",\n // Preferences - Sensitive Personal Information\n PREFERENCES_CLICK_SPI_PURPOSE_AGREE = \"on_preferences_click_spi_purpose_agree\",\n PREFERENCES_CLICK_SPI_PURPOSE_DISAGREE = \"on_preferences_click_spi_purpose_disagree\",\n PREFERENCES_CLICK_SPI_CATEGORY_AGREE = \"on_preferences_click_spi_category_agree\",\n PREFERENCES_CLICK_SPI_CATEGORY_DISAGREE = \"on_preferences_click_spi_category_disagree\",\n PREFERENCES_CLICK_SPI_PURPOSE_SAVE_CHOICES = \"on_preferences_click_spi_purpose_save_choices\",\n // Sync\n SYNC_DONE = \"on_sync_done\",\n SYNC_ERROR = \"on_sync_error\",\n // Language\n LANGUAGE_UPDATED = \"on_language_updated\",\n LANGUAGE_UPDATE_FAILED = \"on_language_update_failed\",\n}\n\nexport interface Vendor {\n id: string;\n iabId: string\n name: string;\n policyUrl: string;\n urls: VendorUrls[];\n namespace: string;\n namespaces: VendorNamespaces;\n iabVendor: boolean;\n purposeIds: string[];\n flexiblePurposeIds: string[];\n specialPurposeIds: string[];\n legIntPurposeIds: string[];\n specialFeatureIds: string[];\n dataDeclaration: string[];\n dataRetention: VendorDataRetention;\n cookieMaxAgeSeconds: number;\n usesNonCookieAccess: boolean;\n}\n\nexport interface VendorNamespaces {\n iab2: string;\n}\n\nexport interface VendorUrls {\n privacy: string;\n legIntClaim: string;\n langId: string;\n}\n\nexport interface VendorDataRetention {\n stdRetention: number;\n purposes: Map<number>;\n specialPurposes: Map<number>;\n}\n\nexport interface Purpose {\n id: string;\n iabId: string;\n name: string;\n description: string;\n descriptionLegal: string;\n illustrations: string[];\n custom: boolean;\n essential: boolean;\n specialFeature: boolean;\n legitimateInterest: boolean;\n consent: boolean;\n category: PurposeCategory;\n}\n\nexport interface PurposeCategory {\n id: string;\n purposeId: string;\n icon: string;\n type: string;\n name: Map<string>;\n description: Map<string>;\n children: PurposeCategory[];\n}\n\nexport interface Map<T> {\n [index: string]: T;\n [index: number]: T;\n}\n\nexport interface UserStatus {\n purposes: UserStatusPurposes;\n vendors: UserStatusVendors;\n user_id: string;\n created: string;\n updated: string;\n consent_string: string;\n additional_consent: string;\n didomi_dcs: string;\n regulation: string;\n}\n\nexport interface UserStatusPurposes {\n global: UserStatusIds;\n consent: UserStatusIds;\n legitimate_interest: UserStatusIds;\n essential: UserStatusIds;\n}\n\nexport interface UserStatusVendors {\n global: UserStatusIds;\n global_consent: UserStatusIds;\n global_legitimate_interest: UserStatusIds;\n consent: UserStatusIds;\n legitimate_interest: UserStatusIds;\n}\n\nexport interface UserStatusIds {\n disabled: string[];\n enabled: string[];\n}\n\nexport interface CurrentUserStatus {\n purposes: Map<PurposeStatus>;\n vendors: Map<VendorStatus>;\n user_id: string;\n created: string;\n updated: string;\n consent_string: string;\n addtl_consent: string;\n didomi_dcs: string;\n regulation: string;\n}\n\nexport interface PurposeStatus {\n id: string;\n enabled: boolean;\n}\n\nexport interface VendorStatus {\n id: string;\n enabled: boolean;\n}\n"],"mappings":"AAAA;AACA,WAAYA,eAAe,0BAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAA,OAAfA,eAAe;AAAA"}
|
package/lib/module/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export { Didomi } from './Didomi';
|
|
2
|
-
export { DidomiEventType, Vendor, VendorNamespaces, Purpose, PurposeCategory, UserStatus, UserStatusPurposes, UserStatusVendors, UserStatusIds } from './DidomiTypes';
|
|
2
|
+
export { DidomiEventType, Vendor, VendorNamespaces, Purpose, PurposeCategory, UserStatus, UserStatusPurposes, UserStatusVendors, UserStatusIds, CurrentUserStatus, PurposeStatus, VendorStatus } from './DidomiTypes';
|
|
3
3
|
//# sourceMappingURL=index.js.map
|
package/lib/module/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Didomi","DidomiEventType","Vendor","VendorNamespaces","Purpose","PurposeCategory","UserStatus","UserStatusPurposes","UserStatusVendors","UserStatusIds"],"sources":["index.tsx"],"sourcesContent":["export { Didomi } from './Didomi';\nexport { DidomiEventType, Vendor, VendorNamespaces, Purpose, PurposeCategory, UserStatus, UserStatusPurposes, UserStatusVendors, UserStatusIds } from './DidomiTypes';\n"],"mappings":"AAAA,SAASA,MAAM,QAAQ,UAAU;AACjC,SAASC,eAAe,EAAEC,MAAM,EAAEC,gBAAgB,EAAEC,OAAO,EAAEC,eAAe,EAAEC,UAAU,EAAEC,kBAAkB,EAAEC,iBAAiB,EAAEC,aAAa,QAAQ,eAAe"}
|
|
1
|
+
{"version":3,"names":["Didomi","DidomiEventType","Vendor","VendorNamespaces","Purpose","PurposeCategory","UserStatus","UserStatusPurposes","UserStatusVendors","UserStatusIds","CurrentUserStatus","PurposeStatus","VendorStatus"],"sources":["index.tsx"],"sourcesContent":["export { Didomi } from './Didomi';\nexport { DidomiEventType, Vendor, VendorNamespaces, Purpose, PurposeCategory, UserStatus, UserStatusPurposes, UserStatusVendors, UserStatusIds, CurrentUserStatus, PurposeStatus, VendorStatus } from './DidomiTypes';\n"],"mappings":"AAAA,SAASA,MAAM,QAAQ,UAAU;AACjC,SAASC,eAAe,EAAEC,MAAM,EAAEC,gBAAgB,EAAEC,OAAO,EAAEC,eAAe,EAAEC,UAAU,EAAEC,kBAAkB,EAAEC,iBAAiB,EAAEC,aAAa,EAAEC,iBAAiB,EAAEC,aAAa,EAAEC,YAAY,QAAQ,eAAe"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export declare const DIDOMI_USER_AGENT_NAME = "Didomi React-Native SDK";
|
|
2
|
-
export declare const DIDOMI_VERSION = "1.
|
|
2
|
+
export declare const DIDOMI_VERSION = "1.26.0";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DidomiEventType, Purpose, UserStatus,
|
|
1
|
+
import { DidomiEventType, Purpose, Vendor, UserStatus, CurrentUserStatus } from './DidomiTypes';
|
|
2
2
|
export declare const Didomi: {
|
|
3
3
|
/**
|
|
4
4
|
* Initialize the Didomi SDK
|
|
@@ -239,6 +239,11 @@ export declare const Didomi: {
|
|
|
239
239
|
* getUserStatus().vendors.global_legitimate_interest.disabled.
|
|
240
240
|
*/
|
|
241
241
|
getUserLegitimateInterestStatusForVendorAndRequiredPurposes: (vendorId: string) => boolean;
|
|
242
|
+
/**
|
|
243
|
+
* Get the current user consent status.
|
|
244
|
+
* @returns: status that represents current user consent.
|
|
245
|
+
*/
|
|
246
|
+
getCurrentUserStatus: () => Promise<CurrentUserStatus>;
|
|
242
247
|
/**
|
|
243
248
|
* Get the user consent status.
|
|
244
249
|
* @returns: status that represents user consent.
|
|
@@ -275,11 +280,24 @@ export declare const Didomi: {
|
|
|
275
280
|
* @returns: **true** if consent is required, **false** if it is not required.
|
|
276
281
|
*/
|
|
277
282
|
isConsentRequired: () => Promise<boolean>;
|
|
283
|
+
/**
|
|
284
|
+
* Determine if user status should be collected for the user.
|
|
285
|
+
* Returns **true** if user status is required for the current user and regulation, and one of the following two conditions is met:
|
|
286
|
+
* - User status has never been collected for this user yet
|
|
287
|
+
* - New user status should be collected (as new vendors have been added) AND the number of days before recollecting them has exceeded
|
|
288
|
+
* @returns: **true** if user status should be collected according to these rules, **false** otherwise.
|
|
289
|
+
*/
|
|
290
|
+
shouldUserStatusBeCollected: () => Promise<boolean>;
|
|
278
291
|
/**
|
|
279
292
|
* Determine if consent information is available for all purposes and vendors that are required
|
|
280
293
|
* @returns: **true** if consent is required and consent information is available, **false** otherwise.
|
|
281
294
|
*/
|
|
282
295
|
isUserConsentStatusPartial: () => Promise<boolean>;
|
|
296
|
+
/**
|
|
297
|
+
* Determine if user did not express a choice for any purpose or vendor that is required
|
|
298
|
+
* @returns: **true** if user choice is required and a choice is not expressed, **false** otherwise.
|
|
299
|
+
*/
|
|
300
|
+
isUserStatusPartial: () => Promise<boolean>;
|
|
283
301
|
/**
|
|
284
302
|
* Check if the consent notice is currently displayed
|
|
285
303
|
* @returns: **true** if the notice is displayed, **false** if is not.
|
|
@@ -389,6 +407,12 @@ export declare const Didomi: {
|
|
|
389
407
|
* @returns: **true** if consent status has been updated, **false** otherwise.
|
|
390
408
|
*/
|
|
391
409
|
setUserDisagreeToAll: () => Promise<boolean>;
|
|
410
|
+
/**
|
|
411
|
+
* Set user's choices for purposes and vendors for the current regulation.
|
|
412
|
+
* @param currentUserStatus: instance of CurrentUserStatus containing the user's choices.
|
|
413
|
+
* @returns: **true** if user status has been updated, **false** otherwise.
|
|
414
|
+
*/
|
|
415
|
+
setCurrentUserStatus: (currentUserStatus: CurrentUserStatus) => Promise<boolean>;
|
|
392
416
|
/**
|
|
393
417
|
* Set the user status for purposes and vendors for consent and legitimate interest.
|
|
394
418
|
* @param purposesConsentStatus: boolean used to determine if consent will be enabled or disabled for all purposes.
|
|
@@ -413,6 +437,7 @@ export declare const Didomi: {
|
|
|
413
437
|
/**
|
|
414
438
|
* Check if the consent should be collected depending on if we have any consents or if we have some consents but the number of days before displaying the notice again has not expired yet
|
|
415
439
|
* @returns: A boolean depending if the consent should be collected or not
|
|
440
|
+
* @deprecated use {@link #shouldUserStatusBeCollected()} instead.
|
|
416
441
|
*/
|
|
417
442
|
shouldConsentBeCollected: () => Promise<boolean>;
|
|
418
443
|
/**
|
|
@@ -127,3 +127,22 @@ export interface UserStatusIds {
|
|
|
127
127
|
disabled: string[];
|
|
128
128
|
enabled: string[];
|
|
129
129
|
}
|
|
130
|
+
export interface CurrentUserStatus {
|
|
131
|
+
purposes: Map<PurposeStatus>;
|
|
132
|
+
vendors: Map<VendorStatus>;
|
|
133
|
+
user_id: string;
|
|
134
|
+
created: string;
|
|
135
|
+
updated: string;
|
|
136
|
+
consent_string: string;
|
|
137
|
+
addtl_consent: string;
|
|
138
|
+
didomi_dcs: string;
|
|
139
|
+
regulation: string;
|
|
140
|
+
}
|
|
141
|
+
export interface PurposeStatus {
|
|
142
|
+
id: string;
|
|
143
|
+
enabled: boolean;
|
|
144
|
+
}
|
|
145
|
+
export interface VendorStatus {
|
|
146
|
+
id: string;
|
|
147
|
+
enabled: boolean;
|
|
148
|
+
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { Didomi } from './Didomi';
|
|
2
|
-
export { DidomiEventType, Vendor, VendorNamespaces, Purpose, PurposeCategory, UserStatus, UserStatusPurposes, UserStatusVendors, UserStatusIds } from './DidomiTypes';
|
|
2
|
+
export { DidomiEventType, Vendor, VendorNamespaces, Purpose, PurposeCategory, UserStatus, UserStatusPurposes, UserStatusVendors, UserStatusIds, CurrentUserStatus, PurposeStatus, VendorStatus } from './DidomiTypes';
|
package/package.json
CHANGED
package/src/Constants.ts
CHANGED
package/src/Didomi.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { NativeModules } from 'react-native';
|
|
2
2
|
import { DidomiListener } from './DidomiListener';
|
|
3
|
-
import { DidomiEventType, Purpose, UserStatus,
|
|
3
|
+
import { DidomiEventType, Purpose, Vendor, UserStatus, CurrentUserStatus } from './DidomiTypes';
|
|
4
4
|
import { DIDOMI_USER_AGENT_NAME, DIDOMI_VERSION } from './Constants';
|
|
5
5
|
|
|
6
6
|
const { Didomi: RNDidomi } = NativeModules;
|
|
@@ -318,6 +318,12 @@ export const Didomi = {
|
|
|
318
318
|
*/
|
|
319
319
|
getUserLegitimateInterestStatusForVendorAndRequiredPurposes: (vendorId: string): boolean => RNDidomi.getUserLegitimateInterestStatusForVendorAndRequiredPurposes(vendorId),
|
|
320
320
|
|
|
321
|
+
/**
|
|
322
|
+
* Get the current user consent status.
|
|
323
|
+
* @returns: status that represents current user consent.
|
|
324
|
+
*/
|
|
325
|
+
getCurrentUserStatus: (): Promise<CurrentUserStatus> => RNDidomi.getCurrentUserStatus(),
|
|
326
|
+
|
|
321
327
|
/**
|
|
322
328
|
* Get the user consent status.
|
|
323
329
|
* @returns: status that represents user consent.
|
|
@@ -360,12 +366,27 @@ export const Didomi = {
|
|
|
360
366
|
*/
|
|
361
367
|
isConsentRequired: (): Promise<boolean> => RNDidomi.isConsentRequired(),
|
|
362
368
|
|
|
369
|
+
/**
|
|
370
|
+
* Determine if user status should be collected for the user.
|
|
371
|
+
* Returns **true** if user status is required for the current user and regulation, and one of the following two conditions is met:
|
|
372
|
+
* - User status has never been collected for this user yet
|
|
373
|
+
* - New user status should be collected (as new vendors have been added) AND the number of days before recollecting them has exceeded
|
|
374
|
+
* @returns: **true** if user status should be collected according to these rules, **false** otherwise.
|
|
375
|
+
*/
|
|
376
|
+
shouldUserStatusBeCollected: (): Promise<boolean> => RNDidomi.shouldUserStatusBeCollected(),
|
|
377
|
+
|
|
363
378
|
/**
|
|
364
379
|
* Determine if consent information is available for all purposes and vendors that are required
|
|
365
380
|
* @returns: **true** if consent is required and consent information is available, **false** otherwise.
|
|
366
381
|
*/
|
|
367
382
|
isUserConsentStatusPartial: (): Promise<boolean> => RNDidomi.isUserConsentStatusPartial(),
|
|
368
383
|
|
|
384
|
+
/**
|
|
385
|
+
* Determine if user did not express a choice for any purpose or vendor that is required
|
|
386
|
+
* @returns: **true** if user choice is required and a choice is not expressed, **false** otherwise.
|
|
387
|
+
*/
|
|
388
|
+
isUserStatusPartial: (): Promise<boolean> => RNDidomi.isUserStatusPartial(),
|
|
389
|
+
|
|
369
390
|
/**
|
|
370
391
|
* Check if the consent notice is currently displayed
|
|
371
392
|
* @returns: **true** if the notice is displayed, **false** if is not.
|
|
@@ -614,6 +635,18 @@ export const Didomi = {
|
|
|
614
635
|
*/
|
|
615
636
|
setUserDisagreeToAll: (): Promise<boolean> => RNDidomi.setUserDisagreeToAll(),
|
|
616
637
|
|
|
638
|
+
/**
|
|
639
|
+
* Set user's choices for purposes and vendors for the current regulation.
|
|
640
|
+
* @param currentUserStatus: instance of CurrentUserStatus containing the user's choices.
|
|
641
|
+
* @returns: **true** if user status has been updated, **false** otherwise.
|
|
642
|
+
*/
|
|
643
|
+
setCurrentUserStatus: (
|
|
644
|
+
currentUserStatus: CurrentUserStatus
|
|
645
|
+
): Promise<boolean> => {
|
|
646
|
+
const jsonString = JSON.stringify(currentUserStatus);
|
|
647
|
+
return RNDidomi.setCurrentUserStatus(jsonString)
|
|
648
|
+
},
|
|
649
|
+
|
|
617
650
|
/**
|
|
618
651
|
* Set the user status for purposes and vendors for consent and legitimate interest.
|
|
619
652
|
* @param purposesConsentStatus: boolean used to determine if consent will be enabled or disabled for all purposes.
|
|
@@ -670,6 +703,7 @@ export const Didomi = {
|
|
|
670
703
|
/**
|
|
671
704
|
* Check if the consent should be collected depending on if we have any consents or if we have some consents but the number of days before displaying the notice again has not expired yet
|
|
672
705
|
* @returns: A boolean depending if the consent should be collected or not
|
|
706
|
+
* @deprecated use {@link #shouldUserStatusBeCollected()} instead.
|
|
673
707
|
*/
|
|
674
708
|
shouldConsentBeCollected: (): Promise<boolean> =>
|
|
675
709
|
RNDidomi.shouldConsentBeCollected(),
|
package/src/DidomiTypes.ts
CHANGED
|
@@ -149,3 +149,25 @@ export interface UserStatusIds {
|
|
|
149
149
|
disabled: string[];
|
|
150
150
|
enabled: string[];
|
|
151
151
|
}
|
|
152
|
+
|
|
153
|
+
export interface CurrentUserStatus {
|
|
154
|
+
purposes: Map<PurposeStatus>;
|
|
155
|
+
vendors: Map<VendorStatus>;
|
|
156
|
+
user_id: string;
|
|
157
|
+
created: string;
|
|
158
|
+
updated: string;
|
|
159
|
+
consent_string: string;
|
|
160
|
+
addtl_consent: string;
|
|
161
|
+
didomi_dcs: string;
|
|
162
|
+
regulation: string;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
export interface PurposeStatus {
|
|
166
|
+
id: string;
|
|
167
|
+
enabled: boolean;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
export interface VendorStatus {
|
|
171
|
+
id: string;
|
|
172
|
+
enabled: boolean;
|
|
173
|
+
}
|
package/src/index.tsx
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { Didomi } from './Didomi';
|
|
2
|
-
export { DidomiEventType, Vendor, VendorNamespaces, Purpose, PurposeCategory, UserStatus, UserStatusPurposes, UserStatusVendors, UserStatusIds } from './DidomiTypes';
|
|
2
|
+
export { DidomiEventType, Vendor, VendorNamespaces, Purpose, PurposeCategory, UserStatus, UserStatusPurposes, UserStatusVendors, UserStatusIds, CurrentUserStatus, PurposeStatus, VendorStatus } from './DidomiTypes';
|