@didomi/react-native 2.7.0 → 2.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (51) hide show
  1. package/README.md +6 -6
  2. package/android/build.gradle +16 -12
  3. package/android/gradle/wrapper/gradle-wrapper.jar +0 -0
  4. package/android/gradle/wrapper/gradle-wrapper.properties +3 -1
  5. package/android/gradle.properties +4 -4
  6. package/android/gradlew +28 -13
  7. package/android/gradlew.bat +19 -16
  8. package/android/src/main/AndroidManifest.xml +1 -2
  9. package/android/src/main/java/{com/reactnativedidomi → io/didomi/reactnative}/DidomiModule.kt +8 -6
  10. package/android/src/main/java/{com/reactnativedidomi → io/didomi/reactnative}/DidomiPackage.kt +1 -2
  11. package/android/src/main/java/{com/reactnativedidomi → io/didomi/reactnative}/EventTypes.kt +11 -1
  12. package/ios/RNDidomi.swift +1 -0
  13. package/lib/commonjs/Constants.js +1 -1
  14. package/lib/commonjs/Constants.js.map +1 -1
  15. package/lib/commonjs/CurrentUserStatusTransaction.js.map +1 -1
  16. package/lib/commonjs/Didomi.js.map +1 -1
  17. package/lib/commonjs/DidomiListener.js +4 -14
  18. package/lib/commonjs/DidomiListener.js.map +1 -1
  19. package/lib/commonjs/DidomiTypes.js.map +1 -1
  20. package/lib/commonjs/index.js.map +1 -1
  21. package/lib/commonjs/package.json +1 -0
  22. package/lib/module/Constants.js +3 -1
  23. package/lib/module/Constants.js.map +1 -1
  24. package/lib/module/CurrentUserStatusTransaction.js +2 -0
  25. package/lib/module/CurrentUserStatusTransaction.js.map +1 -1
  26. package/lib/module/Didomi.js +2 -0
  27. package/lib/module/Didomi.js.map +1 -1
  28. package/lib/module/DidomiListener.js +6 -14
  29. package/lib/module/DidomiListener.js.map +1 -1
  30. package/lib/module/DidomiTypes.js +2 -0
  31. package/lib/module/DidomiTypes.js.map +1 -1
  32. package/lib/module/index.js +2 -0
  33. package/lib/module/index.js.map +1 -1
  34. package/lib/module/package.json +1 -0
  35. package/lib/typescript/Constants.d.ts +2 -1
  36. package/lib/typescript/Constants.d.ts.map +1 -0
  37. package/lib/typescript/CurrentUserStatusTransaction.d.ts +1 -0
  38. package/lib/typescript/CurrentUserStatusTransaction.d.ts.map +1 -0
  39. package/lib/typescript/Didomi.d.ts +1 -0
  40. package/lib/typescript/Didomi.d.ts.map +1 -0
  41. package/lib/typescript/DidomiListener.d.ts +1 -0
  42. package/lib/typescript/DidomiListener.d.ts.map +1 -0
  43. package/lib/typescript/DidomiTypes.d.ts +2 -0
  44. package/lib/typescript/DidomiTypes.d.ts.map +1 -0
  45. package/lib/typescript/index.d.ts +1 -0
  46. package/lib/typescript/index.d.ts.map +1 -0
  47. package/package.json +22 -87
  48. package/react-native-didomi.podspec +1 -1
  49. package/src/Constants.ts +1 -1
  50. package/src/DidomiListener.ts +5 -21
  51. package/src/DidomiTypes.ts +1 -0
package/README.md CHANGED
@@ -75,19 +75,19 @@ For complete instructions on installing and using the plugin, please read our do
75
75
 
76
76
  ## Example applications
77
77
 
78
- Sources contain 2 applications: ``/testApp`` (an app designed mostly for UI testing ) and ``/sampleApp`` (more human friendly app).
78
+ Sources contain 2 applications: ``/test`` (an app designed mostly for UI testing ) and ``/sample`` (more human friendly app).
79
79
 
80
80
  They can be run with:
81
81
 
82
82
  ```bash
83
- # testApp or sampleApp
84
- cd testApp
83
+ # test or sample Application
84
+ cd sample
85
85
  cd ios && pod install
86
- yarn ios
87
- # or yarn android
86
+ cd ..
87
+ npx react-native run-ios
88
+ # or npx react-native run-android
88
89
  ```
89
90
 
90
-
91
91
  ## Suggesting improvements
92
92
 
93
93
  To file bugs, make feature requests, or to suggest other improvements, please use [Github's issue tracker](https://github.com/didomi/reat-native/issues).
@@ -5,13 +5,12 @@ buildscript {
5
5
  def kotlin_version = project.properties["Didomi_kotlinVersion"]
6
6
 
7
7
  repositories {
8
- mavenCentral()
9
8
  google()
9
+ mavenCentral()
10
10
  }
11
11
 
12
12
  dependencies {
13
- classpath "com.android.tools.build:gradle:7.0.4"
14
- // noinspection DifferentKotlinGradleVersion
13
+ classpath "com.android.tools.build:gradle:8.5.2"
15
14
  classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
16
15
  }
17
16
  }
@@ -30,13 +29,12 @@ def getExtOrIntegerDefault(name) {
30
29
  def parsedPackage = new JsonSlurper().parseText(file("../package.json").text)
31
30
 
32
31
  android {
33
- compileSdkVersion getExtOrIntegerDefault("compileSdkVersion")
34
- buildToolsVersion getExtOrDefault("buildToolsVersion")
35
- namespace "com.reactnativedidomi"
32
+ compileSdk getExtOrIntegerDefault("compileSdkVersion")
33
+ namespace "io.didomi.reactnative"
36
34
 
37
35
  defaultConfig {
38
- minSdkVersion getExtOrIntegerDefault("minSdkVersion")
39
- targetSdkVersion getExtOrIntegerDefault("targetSdkVersion")
36
+ minSdk getExtOrIntegerDefault("minSdkVersion")
37
+ targetSdk getExtOrIntegerDefault("targetSdkVersion")
40
38
  versionCode 1
41
39
  versionName "${parsedPackage.version}"
42
40
 
@@ -52,14 +50,20 @@ android {
52
50
  disable "GradleCompatible"
53
51
  }
54
52
  compileOptions {
55
- sourceCompatibility JavaVersion.VERSION_1_8
56
- targetCompatibility JavaVersion.VERSION_1_8
53
+ sourceCompatibility JavaVersion.VERSION_17
54
+ targetCompatibility JavaVersion.VERSION_17
55
+ }
56
+
57
+ kotlinOptions {
58
+ jvmTarget = JavaVersion.VERSION_17
57
59
  }
60
+
58
61
  }
59
62
 
60
63
  repositories {
61
- mavenCentral()
62
64
  google()
65
+ mavenLocal()
66
+ mavenCentral()
63
67
 
64
68
  def found = false
65
69
  def defaultDir = null
@@ -126,5 +130,5 @@ dependencies {
126
130
 
127
131
  implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
128
132
 
129
- implementation "io.didomi.sdk:android:2.10.1"
133
+ implementation "io.didomi.sdk:android:2.17.0"
130
134
  }
@@ -1,5 +1,7 @@
1
1
  distributionBase=GRADLE_USER_HOME
2
2
  distributionPath=wrapper/dists
3
- distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-all.zip
3
+ distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-all.zip
4
+ networkTimeout=10000
5
+ validateDistributionUrl=true
4
6
  zipStoreBase=GRADLE_USER_HOME
5
7
  zipStorePath=wrapper/dists
@@ -1,6 +1,6 @@
1
- Didomi_kotlinVersion=1.8.20
1
+ Didomi_kotlinVersion=1.9.24
2
2
 
3
- Didomi_buildToolsVersion=33.0.2
4
- Didomi_compileSdkVersion=33
3
+ Didomi_buildToolsVersion=34.0.0
4
+ Didomi_compileSdkVersion=34
5
5
  Didomi_minSdkVersion=21
6
- Didomi_targetSdkVersion=33
6
+ Didomi_targetSdkVersion=34
package/android/gradlew CHANGED
@@ -55,7 +55,7 @@
55
55
  # Darwin, MinGW, and NonStop.
56
56
  #
57
57
  # (3) This script is generated from the Groovy template
58
- # https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
58
+ # https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
59
59
  # within the Gradle project.
60
60
  #
61
61
  # You can find Gradle at https://github.com/gradle/gradle/.
@@ -80,13 +80,11 @@ do
80
80
  esac
81
81
  done
82
82
 
83
- APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
84
-
85
- APP_NAME="Gradle"
83
+ # This is normally unused
84
+ # shellcheck disable=SC2034
86
85
  APP_BASE_NAME=${0##*/}
87
-
88
- # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
89
- DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
86
+ # Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
87
+ APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit
90
88
 
91
89
  # Use the maximum available, or set MAX_FD != -1 to use that value.
92
90
  MAX_FD=maximum
@@ -133,22 +131,29 @@ location of your Java installation."
133
131
  fi
134
132
  else
135
133
  JAVACMD=java
136
- which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
134
+ if ! command -v java >/dev/null 2>&1
135
+ then
136
+ die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
137
137
 
138
138
  Please set the JAVA_HOME variable in your environment to match the
139
139
  location of your Java installation."
140
+ fi
140
141
  fi
141
142
 
142
143
  # Increase the maximum file descriptors if we can.
143
144
  if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
144
145
  case $MAX_FD in #(
145
146
  max*)
147
+ # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
148
+ # shellcheck disable=SC2039,SC3045
146
149
  MAX_FD=$( ulimit -H -n ) ||
147
150
  warn "Could not query maximum file descriptor limit"
148
151
  esac
149
152
  case $MAX_FD in #(
150
153
  '' | soft) :;; #(
151
154
  *)
155
+ # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
156
+ # shellcheck disable=SC2039,SC3045
152
157
  ulimit -n "$MAX_FD" ||
153
158
  warn "Could not set maximum file descriptor limit to $MAX_FD"
154
159
  esac
@@ -193,11 +198,15 @@ if "$cygwin" || "$msys" ; then
193
198
  done
194
199
  fi
195
200
 
196
- # Collect all arguments for the java command;
197
- # * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
198
- # shell script including quotes and variable substitutions, so put them in
199
- # double quotes to make sure that they get re-expanded; and
200
- # * put everything else in single quotes, so that it's not re-expanded.
201
+
202
+ # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
203
+ DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
204
+
205
+ # Collect all arguments for the java command:
206
+ # * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
207
+ # and any embedded shellness will be escaped.
208
+ # * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
209
+ # treated as '${Hostname}' itself on the command line.
201
210
 
202
211
  set -- \
203
212
  "-Dorg.gradle.appname=$APP_BASE_NAME" \
@@ -205,6 +214,12 @@ set -- \
205
214
  org.gradle.wrapper.GradleWrapperMain \
206
215
  "$@"
207
216
 
217
+ # Stop when "xargs" is not available.
218
+ if ! command -v xargs >/dev/null 2>&1
219
+ then
220
+ die "xargs is not available"
221
+ fi
222
+
208
223
  # Use "xargs" to parse quoted args.
209
224
  #
210
225
  # With -n1 it outputs one arg per line, with the quotes and backslashes removed.
@@ -14,7 +14,7 @@
14
14
  @rem limitations under the License.
15
15
  @rem
16
16
 
17
- @if "%DEBUG%" == "" @echo off
17
+ @if "%DEBUG%"=="" @echo off
18
18
  @rem ##########################################################################
19
19
  @rem
20
20
  @rem Gradle startup script for Windows
@@ -25,7 +25,8 @@
25
25
  if "%OS%"=="Windows_NT" setlocal
26
26
 
27
27
  set DIRNAME=%~dp0
28
- if "%DIRNAME%" == "" set DIRNAME=.
28
+ if "%DIRNAME%"=="" set DIRNAME=.
29
+ @rem This is normally unused
29
30
  set APP_BASE_NAME=%~n0
30
31
  set APP_HOME=%DIRNAME%
31
32
 
@@ -40,13 +41,13 @@ if defined JAVA_HOME goto findJavaFromJavaHome
40
41
 
41
42
  set JAVA_EXE=java.exe
42
43
  %JAVA_EXE% -version >NUL 2>&1
43
- if "%ERRORLEVEL%" == "0" goto execute
44
+ if %ERRORLEVEL% equ 0 goto execute
44
45
 
45
- echo.
46
- echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
47
- echo.
48
- echo Please set the JAVA_HOME variable in your environment to match the
49
- echo location of your Java installation.
46
+ echo. 1>&2
47
+ echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
48
+ echo. 1>&2
49
+ echo Please set the JAVA_HOME variable in your environment to match the 1>&2
50
+ echo location of your Java installation. 1>&2
50
51
 
51
52
  goto fail
52
53
 
@@ -56,11 +57,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe
56
57
 
57
58
  if exist "%JAVA_EXE%" goto execute
58
59
 
59
- echo.
60
- echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
61
- echo.
62
- echo Please set the JAVA_HOME variable in your environment to match the
63
- echo location of your Java installation.
60
+ echo. 1>&2
61
+ echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
62
+ echo. 1>&2
63
+ echo Please set the JAVA_HOME variable in your environment to match the 1>&2
64
+ echo location of your Java installation. 1>&2
64
65
 
65
66
  goto fail
66
67
 
@@ -75,13 +76,15 @@ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
75
76
 
76
77
  :end
77
78
  @rem End local scope for the variables with windows NT shell
78
- if "%ERRORLEVEL%"=="0" goto mainEnd
79
+ if %ERRORLEVEL% equ 0 goto mainEnd
79
80
 
80
81
  :fail
81
82
  rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
82
83
  rem the _cmd.exe /c_ return code!
83
- if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
84
- exit /b 1
84
+ set EXIT_CODE=%ERRORLEVEL%
85
+ if %EXIT_CODE% equ 0 set EXIT_CODE=1
86
+ if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
87
+ exit /b %EXIT_CODE%
85
88
 
86
89
  :mainEnd
87
90
  if "%OS%"=="Windows_NT" endlocal
@@ -1,2 +1 @@
1
- <manifest xmlns:android="http://schemas.android.com/apk/res/android"
2
- package="com.reactnativedidomi"/>
1
+ <manifest />
@@ -1,6 +1,5 @@
1
1
  @file:Suppress("unused")
2
-
3
- package com.reactnativedidomi
2
+ package io.didomi.reactnative
4
3
 
5
4
  import android.util.Log
6
5
  import androidx.fragment.app.FragmentActivity
@@ -15,9 +14,9 @@ import io.didomi.sdk.DidomiInitializeParameters
15
14
  import io.didomi.sdk.events.*
16
15
  import io.didomi.sdk.exceptions.DidomiNotReadyException
17
16
  import io.didomi.sdk.models.CurrentUserStatus
18
- import io.didomi.sdk.user.UserAuthParams
19
- import io.didomi.sdk.user.UserAuthWithEncryptionParams
20
- import io.didomi.sdk.user.UserAuthWithHashParams
17
+ import io.didomi.sdk.user.model.UserAuthParams
18
+ import io.didomi.sdk.user.model.UserAuthWithEncryptionParams
19
+ import io.didomi.sdk.user.model.UserAuthWithHashParams
21
20
  import org.json.JSONArray
22
21
  import org.json.JSONException
23
22
  import org.json.JSONObject
@@ -309,6 +308,7 @@ class DidomiModule(reactContext: ReactApplicationContext) : ReactContextBaseJava
309
308
  map.putArray(entry.key, Arguments.makeNativeArray(listValues))
310
309
  }
311
310
  }
311
+
312
312
  is Boolean -> map.putBoolean(entry.key, value)
313
313
  is Int -> map.putInt(entry.key, value)
314
314
  is Double -> map.putDouble(entry.key, value)
@@ -590,6 +590,7 @@ class DidomiModule(reactContext: ReactApplicationContext) : ReactContextBaseJava
590
590
  }
591
591
 
592
592
  @ReactMethod
593
+ @Deprecated("Use shouldUserStatusBeCollected instead", replaceWith = ReplaceWith("shouldUserStatusBeCollected()"))
593
594
  fun isUserConsentStatusPartial(promise: Promise) {
594
595
  try {
595
596
  promise.resolve(Didomi.getInstance().isUserConsentStatusPartial)
@@ -1084,7 +1085,7 @@ class DidomiModule(reactContext: ReactApplicationContext) : ReactContextBaseJava
1084
1085
  syncAcknowledgedCallbacks.remove(callbackIndex)
1085
1086
  if (result != null) {
1086
1087
  promise.resolve(result)
1087
- } else {
1088
+ } else {
1088
1089
  promise.reject(java.lang.IllegalStateException("SyncAcknowledged: Native callback not found. The method can be called only once."))
1089
1090
  }
1090
1091
  }
@@ -1108,6 +1109,7 @@ class DidomiModule(reactContext: ReactApplicationContext) : ReactContextBaseJava
1108
1109
  val callbackIndex = syncAcknowledgedCallbackIndex++
1109
1110
  syncAcknowledgedCallbacks[callbackIndex] = event.syncAcknowledged
1110
1111
  val params = WritableNativeMap().apply {
1112
+ putString("organizationUserId", event.organizationUserId)
1111
1113
  putBoolean("statusApplied", event.statusApplied)
1112
1114
  putInt("syncAcknowledgedIndex", callbackIndex)
1113
1115
  }
@@ -1,11 +1,10 @@
1
- package com.reactnativedidomi
1
+ package io.didomi.reactnative
2
2
 
3
3
  import com.facebook.react.ReactPackage
4
4
  import com.facebook.react.bridge.NativeModule
5
5
  import com.facebook.react.bridge.ReactApplicationContext
6
6
  import com.facebook.react.uimanager.ViewManager
7
7
 
8
-
9
8
  class DidomiPackage : ReactPackage {
10
9
  override fun createNativeModules(reactContext: ReactApplicationContext): List<NativeModule> {
11
10
  return listOf(DidomiModule(reactContext))
@@ -1,13 +1,15 @@
1
- package com.reactnativedidomi
1
+ package io.didomi.reactnative
2
2
 
3
3
  enum class EventTypes(val event: String) {
4
4
  // Consent
5
5
  CONSENT_CHANGED("on_consent_changed"),
6
+
6
7
  // SDK lifecycle events
7
8
  ERROR("on_error"),
8
9
  ERROR_CALLBACK("on_error_callback"),
9
10
  READY("on_ready"),
10
11
  READY_CALLBACK("on_ready_callback"),
12
+
11
13
  // Notice
12
14
  HIDE_NOTICE("on_hide_notice"),
13
15
  SHOW_NOTICE("on_show_notice"),
@@ -17,13 +19,16 @@ enum class EventTypes(val event: String) {
17
19
  NOTICE_CLICK_VIEW_SPI_PURPOSES("on_notice_click_view_spi_purposes"),
18
20
  NOTICE_CLICK_MORE_INFO("on_notice_click_more_info"),
19
21
  NOTICE_CLICK_PRIVACY_POLICY("on_notice_click_privacy_policy"),
22
+
20
23
  // Preferences
21
24
  HIDE_PREFERENCES("on_hide_preferences"),
22
25
  SHOW_PREFERENCES("on_show_preferences"),
26
+
23
27
  // Preferences - Views
24
28
  PREFERENCES_CLICK_VIEW_PURPOSES("on_preferences_click_view_purposes"),
25
29
  PREFERENCES_CLICK_VIEW_VENDORS("on_preferences_click_view_vendors"),
26
30
  PREFERENCES_CLICK_VIEW_SPI_PURPOSES("on_preferences_click_view_spi_purposes"),
31
+
27
32
  // Preferences - Purpose
28
33
  PREFERENCES_CLICK_AGREE_TO_ALL("on_preferences_click_agree_to_all"),
29
34
  PREFERENCES_CLICK_DISAGREE_TO_ALL("on_preferences_click_disagree_to_all"),
@@ -35,25 +40,30 @@ enum class EventTypes(val event: String) {
35
40
  PREFERENCES_CLICK_CATEGORY_AGREE("on_preferences_click_category_agree"),
36
41
  PREFERENCES_CLICK_CATEGORY_DISAGREE("on_preferences_click_category_disagree"),
37
42
  PREFERENCES_CLICK_SAVE_CHOICES("on_preferences_click_save_choices"),
43
+
38
44
  // Preferences - Vendor
39
45
  PREFERENCES_CLICK_AGREE_TO_ALL_VENDORS("on_preferences_click_agree_to_all_vendors"),
40
46
  PREFERENCES_CLICK_DISAGREE_TO_ALL_VENDORS("on_preferences_click_disagree_to_all_vendors"),
41
47
  PREFERENCES_CLICK_VENDOR_AGREE("on_preferences_click_vendor_agree"),
42
48
  PREFERENCES_CLICK_VENDOR_DISAGREE("on_preferences_click_vendor_disagree"),
43
49
  PREFERENCES_CLICK_VENDOR_SAVE_CHOICES("on_preferences_click_vendor_save_choices"),
50
+
44
51
  // Preferences - Sensitive Personal Information
45
52
  PREFERENCES_CLICK_SPI_PURPOSE_AGREE("on_preferences_click_spi_purpose_agree"),
46
53
  PREFERENCES_CLICK_SPI_PURPOSE_DISAGREE("on_preferences_click_spi_purpose_disagree"),
47
54
  PREFERENCES_CLICK_SPI_CATEGORY_AGREE("on_preferences_click_spi_category_agree"),
48
55
  PREFERENCES_CLICK_SPI_CATEGORY_DISAGREE("on_preferences_click_spi_category_disagree"),
49
56
  PREFERENCES_CLICK_SPI_PURPOSE_SAVE_CHOICES("on_preferences_click_spi_purpose_save_choices"),
57
+
50
58
  // Sync
51
59
  SYNC_DONE("on_sync_done"),
52
60
  SYNC_READY("on_sync_ready"),
53
61
  SYNC_ERROR("on_sync_error"),
62
+
54
63
  // Language
55
64
  LANGUAGE_UPDATED("on_language_updated"),
56
65
  LANGUAGE_UPDATE_FAILED("on_language_update_failed"),
66
+
57
67
  // Vendor Status
58
68
  VENDOR_STATUS_CHANGE_PREFIX("on_vendor_status_change_");
59
69
  }
@@ -841,6 +841,7 @@ extension RNDidomi {
841
841
  self?.syncAcknowledgedCallbackIndex += 1
842
842
  self?.syncAcknowledgedCallbacks[callbackIndex] = event.syncAcknowledged
843
843
  let result = [
844
+ "organizationUserId": event.organizationUserId,
844
845
  "statusApplied": event.statusApplied,
845
846
  "syncAcknowledgedIndex": callbackIndex
846
847
  ]
@@ -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 = "2.7.0";
10
+ const DIDOMI_VERSION = exports.DIDOMI_VERSION = "2.8.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 = \"2.7.0\"\n"],"mappings":";;;;;;AAAA;AACO,MAAMA,sBAAsB,GAAAC,OAAA,CAAAD,sBAAA,GAAG,yBAAyB;AAC/D;AACO,MAAME,cAAc,GAAAD,OAAA,CAAAC,cAAA,GAAG,OAAO","ignoreList":[]}
1
+ {"version":3,"names":["DIDOMI_USER_AGENT_NAME","exports","DIDOMI_VERSION"],"sourceRoot":"../../src","sources":["Constants.ts"],"mappings":";;;;;;AAAA;AACO,MAAMA,sBAAsB,GAAAC,OAAA,CAAAD,sBAAA,GAAG,yBAAyB;AAC/D;AACO,MAAME,cAAc,GAAAD,OAAA,CAAAC,cAAA,GAAG,OAAO","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["createCurrentUserStatusTransaction","nativeCallback","purposesStatus","vendorsStatus","enablePurposes","ids","forEach","enablePurpose","transaction","id","enabled","enableVendors","enableVendor","disablePurposes","disablePurpose","disableVendors","disableVendor","commit","vendorIdsFromStatus","getIdsFromStatus","purposeIdsFromStatus","result","disabled","exports","status","keys","Object","key","value","push"],"sources":["CurrentUserStatusTransaction.ts"],"sourcesContent":["import { PurposeStatus, VendorStatus } from './DidomiTypes';\n\n// Transaction type exposed to client's app that allows the enabling and disabling of vendors and purposes.\nexport interface CurrentUserStatusTransaction {\n // Function to enable a specific purpose by its ID and returns the updated transaction\n enablePurpose(id: string): CurrentUserStatusTransaction;\n\n // Function to enable multiple purposes at once by their IDs and returns the updated transaction\n enablePurposes(ids: string[]): CurrentUserStatusTransaction;\n\n // Function to enable a specific vendor by its ID and returns the updated transaction\n enableVendor(id: string): CurrentUserStatusTransaction;\n\n // Function to enable multiple vendors at once by their IDs and returns the updated transaction\n enableVendors(ids: string[]): CurrentUserStatusTransaction;\n\n // Function to disable a specific purpose by its ID and returns the updated transaction\n disablePurpose(id: string): CurrentUserStatusTransaction;\n\n // Function to disable multiple purposes at once by their IDs and returns the updated transaction\n disablePurposes(ids: string[]): CurrentUserStatusTransaction;\n\n // Function to disable a specific vendor by its ID and returns the updated transaction\n disableVendor(id: string): CurrentUserStatusTransaction;\n\n // Function to disable multiple vendors at once by their IDs and returns the updated transaction\n disableVendors(ids: string[]): CurrentUserStatusTransaction;\n\n // Function to commit the changes made to the status of purposes and vendors\n // Returns a Promise that resolves to a boolean indicating whether the commit was successful\n commit(): Promise<boolean>;\n}\n\n// Interface used to transfer enabled and disabled IDs between internal methods in a more convenient way.\ninterface StatusIDs {\n enabled: string[];\n disabled: string[];\n}\n\n// Callback executed once changes are committed to the native implementation.\ntype NativeCallback = (\n enabledPurposes: string[],\n disabledPurposes: string[],\n enabledVendors: string[],\n disabledVendors: string[]\n ) => Promise<boolean>;\n\n// Create a `CurrentUserStatusTransaction` object based on the native implementation.\n// Please note that this implementation delays the interaction with the native libraries until the changes are committed.\nexport const createCurrentUserStatusTransaction = (nativeCallback: NativeCallback): CurrentUserStatusTransaction => {\n\n // Variable used to store statuses before changes are committed against the transaction.\n let purposesStatus: { [key: string]: PurposeStatus } = {};\n let vendorsStatus: { [key: string]: VendorStatus } = {};\n\n const enablePurposes = (ids: string[]): CurrentUserStatusTransaction => {\n ids.forEach(enablePurpose);\n return transaction;\n };\n\n const enablePurpose = (id: string): CurrentUserStatusTransaction => {\n purposesStatus[id] = { id, enabled: true };\n return transaction;\n };\n\n const enableVendors = (ids: string[]): CurrentUserStatusTransaction => {\n ids.forEach(enableVendor);\n return transaction;\n };\n\n const enableVendor = (id: string): CurrentUserStatusTransaction => {\n vendorsStatus[id] = { id, enabled: true };\n return transaction;\n };\n\n const disablePurposes = (ids: string[]): CurrentUserStatusTransaction => {\n ids.forEach(disablePurpose);\n return transaction;\n };\n\n const disablePurpose = (id: string): CurrentUserStatusTransaction => {\n purposesStatus[id] = { id, enabled: false };\n return transaction;\n };\n\n const disableVendors = (ids: string[]) => {\n ids.forEach(disableVendor);\n return transaction;\n };\n\n const disableVendor = (id: string): CurrentUserStatusTransaction => {\n vendorsStatus[id] = { id, enabled: false };\n return transaction;\n };\n\n const commit = (): Promise<boolean> => {\n const vendorIdsFromStatus = getIdsFromStatus(vendorsStatus);\n const purposeIdsFromStatus = getIdsFromStatus(purposesStatus);\n\n const result = nativeCallback(\n purposeIdsFromStatus.enabled,\n purposeIdsFromStatus.disabled,\n vendorIdsFromStatus.enabled,\n vendorIdsFromStatus.disabled,\n );\n\n return result;\n };\n\n const transaction: CurrentUserStatusTransaction = {\n enablePurpose,\n enablePurposes,\n enableVendor,\n enableVendors,\n disablePurpose,\n disablePurposes,\n disableVendor,\n disableVendors,\n commit,\n };\n\n return transaction;\n}\n\n// Separates and returns IDs from the `status` object into `enabled` and `disabled` based on their `enabled` state.\nconst getIdsFromStatus = (status: { [key: string]: PurposeStatus } | { [key: string]: VendorStatus }): StatusIDs => {\n let enabled: string[] = [];\n let disabled: string[] = [];\n const keys = Object.keys(status);\n keys.forEach((key) => {\n const value = status[key];\n if (value.enabled) {\n enabled.push(key);\n } else {\n disabled.push(key);\n }\n });\n\n return { enabled, disabled };\n}\n"],"mappings":";;;;;;AAEA;;AA+BA;;AAMA;;AAQA;AACA;AACO,MAAMA,kCAAkC,GAAIC,cAA8B,IAAmC;EAElH;EACA,IAAIC,cAAgD,GAAG,CAAC,CAAC;EACzD,IAAIC,aAA8C,GAAG,CAAC,CAAC;EAEvD,MAAMC,cAAc,GAAIC,GAAa,IAAmC;IACtEA,GAAG,CAACC,OAAO,CAACC,aAAa,CAAC;IAC1B,OAAOC,WAAW;EACpB,CAAC;EAED,MAAMD,aAAa,GAAIE,EAAU,IAAmC;IAClEP,cAAc,CAACO,EAAE,CAAC,GAAG;MAAEA,EAAE;MAAEC,OAAO,EAAE;IAAK,CAAC;IAC1C,OAAOF,WAAW;EACpB,CAAC;EAED,MAAMG,aAAa,GAAIN,GAAa,IAAmC;IACrEA,GAAG,CAACC,OAAO,CAACM,YAAY,CAAC;IACzB,OAAOJ,WAAW;EACpB,CAAC;EAED,MAAMI,YAAY,GAAIH,EAAU,IAAmC;IACjEN,aAAa,CAACM,EAAE,CAAC,GAAG;MAAEA,EAAE;MAAEC,OAAO,EAAE;IAAK,CAAC;IACzC,OAAOF,WAAW;EACpB,CAAC;EAED,MAAMK,eAAe,GAAIR,GAAa,IAAmC;IACvEA,GAAG,CAACC,OAAO,CAACQ,cAAc,CAAC;IAC3B,OAAON,WAAW;EACpB,CAAC;EAED,MAAMM,cAAc,GAAIL,EAAU,IAAmC;IACnEP,cAAc,CAACO,EAAE,CAAC,GAAG;MAAEA,EAAE;MAAEC,OAAO,EAAE;IAAM,CAAC;IAC3C,OAAOF,WAAW;EACpB,CAAC;EAED,MAAMO,cAAc,GAAIV,GAAa,IAAK;IACxCA,GAAG,CAACC,OAAO,CAACU,aAAa,CAAC;IAC1B,OAAOR,WAAW;EACpB,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}
1
+ {"version":3,"names":["createCurrentUserStatusTransaction","nativeCallback","purposesStatus","vendorsStatus","enablePurposes","ids","forEach","enablePurpose","transaction","id","enabled","enableVendors","enableVendor","disablePurposes","disablePurpose","disableVendors","disableVendor","commit","vendorIdsFromStatus","getIdsFromStatus","purposeIdsFromStatus","result","disabled","exports","status","keys","Object","key","value","push"],"sourceRoot":"../../src","sources":["CurrentUserStatusTransaction.ts"],"mappings":";;;;;;AAEA;;AA+BA;;AAMA;;AAQA;AACA;AACO,MAAMA,kCAAkC,GAAIC,cAA8B,IAAmC;EAElH;EACA,IAAIC,cAAgD,GAAG,CAAC,CAAC;EACzD,IAAIC,aAA8C,GAAG,CAAC,CAAC;EAEvD,MAAMC,cAAc,GAAIC,GAAa,IAAmC;IACtEA,GAAG,CAACC,OAAO,CAACC,aAAa,CAAC;IAC1B,OAAOC,WAAW;EACpB,CAAC;EAED,MAAMD,aAAa,GAAIE,EAAU,IAAmC;IAClEP,cAAc,CAACO,EAAE,CAAC,GAAG;MAAEA,EAAE;MAAEC,OAAO,EAAE;IAAK,CAAC;IAC1C,OAAOF,WAAW;EACpB,CAAC;EAED,MAAMG,aAAa,GAAIN,GAAa,IAAmC;IACrEA,GAAG,CAACC,OAAO,CAACM,YAAY,CAAC;IACzB,OAAOJ,WAAW;EACpB,CAAC;EAED,MAAMI,YAAY,GAAIH,EAAU,IAAmC;IACjEN,aAAa,CAACM,EAAE,CAAC,GAAG;MAAEA,EAAE;MAAEC,OAAO,EAAE;IAAK,CAAC;IACzC,OAAOF,WAAW;EACpB,CAAC;EAED,MAAMK,eAAe,GAAIR,GAAa,IAAmC;IACvEA,GAAG,CAACC,OAAO,CAACQ,cAAc,CAAC;IAC3B,OAAON,WAAW;EACpB,CAAC;EAED,MAAMM,cAAc,GAAIL,EAAU,IAAmC;IACnEP,cAAc,CAACO,EAAE,CAAC,GAAG;MAAEA,EAAE;MAAEC,OAAO,EAAE;IAAM,CAAC;IAC3C,OAAOF,WAAW;EACpB,CA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,CAACF,GAAG,CAAC;IACpB;EACF,CAAC,CAAC;EAEF,OAAO;IAAEjB,OAAO;IAAEY;EAAS,CAAC;AAC9B,CAAC","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["_reactNative","require","_DidomiListener","_Constants","_CurrentUserStatusTransaction","Didomi","RNDidomi","NativeModules","exports","initialize","apiKey","localConfigurationPath","remoteConfigurationUrl","providerId","disableDidomiRemoteConfig","languageCode","noticeId","androidTvNoticeId","androidTvEnabled","countryCode","regionCode","DidomiListener","init","DIDOMI_USER_AGENT_NAME","DIDOMI_VERSION","onReady","promise","setOnReadyListener","onError","setOnErrorListener","setupUI","setLogLevel","level","addEventListener","eventType","callback","addVendorStatusListener","vendorId","listenToVendorStatus","removeVendorStatusListener","stopListeningToVendorStatus","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","getUserConsentStatusForVendorAndRequiredPurposes","getUserLegitimateInterestStatusForPurpose","getUserLegitimateInterestForVendor","getUserLegitimateInterestStatusForVendor","getUserLegitimateInterestStatusForVendorAndRequiredPurposes","getCurrentUserStatus","getUserStatus","getUserStatusForVendor","getVendor","getTotalVendorCount","getIabVendorCount","getNonIabVendorCount","hideNotice","hidePreferences","isConsentRequired","shouldUserStatusBeCollected","isUserConsentStatusPartial","isUserStatusPartial","isNoticeVisible","isPreferencesVisible","isError","isReady","clearUser","setUser","id","setUserAndSetupUI","setUserWithHashAuth","algorithm","secretId","digest","salt","expiration","undefined","setUserWithHashAuthWithExpiration","setUserWithHashAuthAndSetupUI","setUserWithHashAuthWithExpirationAndSetupUI","setUserWithEncryptionAuth","initializationVector","setUserWithEncryptionAuthWithExpiration","setUserWithEncryptionAuthAndSetupUI","setUserWithEncryptionAuthWithExpirationAndSetupUI","setUserWithAuthParams","userAuthParams","synchronizedUsers","JSON","stringify","setUserWithAuthParamsAndSetupUI","showNotice","showPreferences","view","setUserAgreeToAll","setUserConsentStatus","enabledPurposeIds","disabledPurposeIds","enabledVendorIds","disabledVendorIds","setUserDisagreeToAll","setCurrentUserStatus","currentUserStatus","jsonString","setUserStatus","purposesConsentStatus","purposesLIStatus","vendorsConsentStatus","vendorsLIStatus","setUserStatusSets","enabledConsentPurposeIds","disabledConsentPurposeIds","enabledLIPurposeIds","disabledLIPurposeIds","enabledConsentVendorIds","disabledConsentVendorIds","enabledLIVendorIds","disabledLIVendorIds","shouldConsentBeCollected","updateSelectedLanguage","openCurrentUserStatusTransaction","createCurrentUserStatusTransaction","commitCurrentUserStatusTransaction"],"sources":["Didomi.ts"],"sourcesContent":["import { NativeModules } from 'react-native';\nimport { DidomiListener } from './DidomiListener';\nimport { DidomiEventType, Purpose, Vendor, UserStatus, CurrentUserStatus, VendorStatus, UserAuthParams } from './DidomiTypes';\nimport { DIDOMI_USER_AGENT_NAME, DIDOMI_VERSION } from './Constants';\nimport { CurrentUserStatusTransaction, createCurrentUserStatusTransaction } from './CurrentUserStatusTransaction';\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 * @param countryCode: Override user country code when determining the privacy regulation to apply. Keep undefined to let the Didomi SDK determine the user country.\n * @param regionCode: Override user region code when determining the privacy regulation to apply. Keep undefined to let the Didomi SDK determine the user region. Ignored if countryCode is not set.\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 countryCode?: string,\n regionCode?: string,\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 countryCode,\n regionCode\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 * Add a listener to be triggered when the user status for the selected vendor changes\n * The callback will be registered after the SDK is ready\n * @param vendorId: the id of the vendor\n * @param callback: the callback to trigger when the user status for the selected vendor changes\n */\n addVendorStatusListener: (\n vendorId: string,\n callback: (vendorStatus: VendorStatus) => void\n ) => {\n RNDidomi.listenToVendorStatus(vendorId)\n DidomiListener.addVendorStatusListener(vendorId, callback);\n },\n\n /**\n * Remove one or multiple previously added vendor status listeners\n * @param vendorId the id of the vendor\n */\n removeVendorStatusListener: (vendorId: string) => {\n RNDidomi.stopListeningToVendorStatus(vendorId)\n DidomiListener.removeVendorStatusListener(vendorId);\n },\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 #getCurrentUserStatus()} instead.\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 #getCurrentUserStatus()} instead.\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 #getCurrentUserStatus()} instead.\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 #getCurrentUserStatus()} instead.\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 #getCurrentUserStatus()} instead.\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 #getCurrentUserStatus()} instead.\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 #getCurrentUserStatus()} instead.\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 #getCurrentUserStatus()} instead.\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 * @deprecated use {@link #getRequiredPurposes()} instead.\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 * @deprecated use {@link #getRequiredVendors()} instead.\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 #getCurrentUserStatus()} instead.\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 #getCurrentUserStatus()} instead.\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 #getCurrentUserStatus()} instead.\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 #getCurrentUserStatus()} instead.\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 #getCurrentUserStatus()} instead.\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 #getCurrentUserStatus()} instead.\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 * @deprecated use {@link #getCurrentUserStatus()} instead.\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 * Get the total Vendor count.\n * @returns: total vendor count.\n */\n getTotalVendorCount: (): Promise<number> => RNDidomi.getTotalVendorCount(),\n\n /**\n * Get the IAB Vendor count.\n * @returns: IAB vendor count.\n */\n getIabVendorCount: (): Promise<number> => RNDidomi.getIabVendorCount(),\n\n /**\n * Get the non-IAB Vendor count.\n * @returns: non-IAB vendor count.\n */\n getNonIabVendorCount: (): Promise<number> => RNDidomi.getNonIabVendorCount(),\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 * @deprecated use {@link #shouldUserStatusBeCollected()} instead.\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 * @deprecated use {@link #isUserStatusPartial()} instead.\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 */\n setUser: (id: string): Promise<void> => RNDidomi.setUser(id),\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 * @deprecated use {@link #setUserWithAuthParams()} instead.\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 * @deprecated use {@link #setUserWithAuthParamsAndSetupUI()} instead.\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 * @deprecated use {@link #setUserWithAuthParams()} instead.\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 * @deprecated use {@link #setUserWithAuthParamsAndSetupUI()} instead.\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 * Set user information with authentication (Hash or Encryption)\n *\n * @param userAuthParams as UserAuthParams (use UserAuthWithEncryptionParams or UserAuthWithHashParams)\n * @param synchronizedUsers as UserAuthParams[] (optional)\n */\n setUserWithAuthParams: (\n userAuthParams: UserAuthParams,\n synchronizedUsers?: UserAuthParams[] | undefined\n ): void => RNDidomi.setUserWithAuthParams(JSON.stringify(userAuthParams), JSON.stringify(synchronizedUsers)),\n\n /**\n * Set user information with authentication (Hash or Encryption) and check for missing consent\n *\n * @param userAuthParams as UserAuthParams (use UserAuthWithEncryptionParams or UserAuthWithHashParams)\n * @param synchronizedUsers as UserAuthParams[] (optional)\n */\n setUserWithAuthParamsAndSetupUI: (\n userAuthParams: UserAuthParams,\n synchronizedUsers?: UserAuthParams[] | undefined\n ): void => RNDidomi.setUserWithAuthParamsAndSetupUI(JSON.stringify(userAuthParams), JSON.stringify(synchronizedUsers)),\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`, `vendors` or `senstive-personal-information`.\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 * @deprecated use {@link #setCurrentUserStatus()} instead.\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 * @deprecated use {@link #setCurrentUserStatus()} instead.\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 /**\n * Creates a `CurrentUserStatusTransaction` object.\n * This object provides mechanisms to stage updates to the user status regarding purposes and vendors, allowing for batch operations. \n * Updates made through its methods are queued and applied simultaneously to the user status only once the commit method of the returned object is called.\n * @returns A new `CurrentUserStatusTransaction` object.\n */\n openCurrentUserStatusTransaction: (): CurrentUserStatusTransaction => createCurrentUserStatusTransaction(RNDidomi.commitCurrentUserStatusTransaction),\n};\n"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,eAAA,GAAAD,OAAA;AAEA,IAAAE,UAAA,GAAAF,OAAA;AACA,IAAAG,6BAAA,GAAAH,OAAA;AAEA,MAAM;EAAEI,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;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,EACjCC,WAAoB,EACpBC,UAAmB,KACD;IAClB;IACA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C,EAAEA,CAAA,KAAoC,IAAAC,gEAAkC,EAACzI,QAAQ,CAAC0I,kCAAkC;AACtJ,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["_reactNative","require","_DidomiListener","_Constants","_CurrentUserStatusTransaction","Didomi","RNDidomi","NativeModules","exports","initialize","apiKey","localConfigurationPath","remoteConfigurationUrl","providerId","disableDidomiRemoteConfig","languageCode","noticeId","androidTvNoticeId","androidTvEnabled","countryCode","regionCode","DidomiListener","init","DIDOMI_USER_AGENT_NAME","DIDOMI_VERSION","onReady","promise","setOnReadyListener","onError","setOnErrorListener","setupUI","setLogLevel","level","addEventListener","eventType","callback","addVendorStatusListener","vendorId","listenToVendorStatus","removeVendorStatusListener","stopListeningToVendorStatus","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","getUserConsentStatusForVendorAndRequiredPurposes","getUserLegitimateInterestStatusForPurpose","getUserLegitimateInterestForVendor","getUserLegitimateInterestStatusForVendor","getUserLegitimateInterestStatusForVendorAndRequiredPurposes","getCurrentUserStatus","getUserStatus","getUserStatusForVendor","getVendor","getTotalVendorCount","getIabVendorCount","getNonIabVendorCount","hideNotice","hidePreferences","isConsentRequired","shouldUserStatusBeCollected","isUserConsentStatusPartial","isUserStatusPartial","isNoticeVisible","isPreferencesVisible","isError","isReady","clearUser","setUser","id","setUserAndSetupUI","setUserWithHashAuth","algorithm","secretId","digest","salt","expiration","undefined","setUserWithHashAuthWithExpiration","setUserWithHashAuthAndSetupUI","setUserWithHashAuthWithExpirationAndSetupUI","setUserWithEncryptionAuth","initializationVector","setUserWithEncryptionAuthWithExpiration","setUserWithEncryptionAuthAndSetupUI","setUserWithEncryptionAuthWithExpirationAndSetupUI","setUserWithAuthParams","userAuthParams","synchronizedUsers","JSON","stringify","setUserWithAuthParamsAndSetupUI","showNotice","showPreferences","view","setUserAgreeToAll","setUserConsentStatus","enabledPurposeIds","disabledPurposeIds","enabledVendorIds","disabledVendorIds","setUserDisagreeToAll","setCurrentUserStatus","currentUserStatus","jsonString","setUserStatus","purposesConsentStatus","purposesLIStatus","vendorsConsentStatus","vendorsLIStatus","setUserStatusSets","enabledConsentPurposeIds","disabledConsentPurposeIds","enabledLIPurposeIds","disabledLIPurposeIds","enabledConsentVendorIds","disabledConsentVendorIds","enabledLIVendorIds","disabledLIVendorIds","shouldConsentBeCollected","updateSelectedLanguage","openCurrentUserStatusTransaction","createCurrentUserStatusTransaction","commitCurrentUserStatusTransaction"],"sourceRoot":"../../src","sources":["Didomi.ts"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,eAAA,GAAAD,OAAA;AAEA,IAAAE,UAAA,GAAAF,OAAA;AACA,IAAAG,6BAAA,GAAAH,OAAA;AAEA,MAAM;EAAEI,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;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,EACjCC,WAAoB,EACpBC,UAAmB,KACD;IAClB;IACAC,8BAAc,CAACC,IAAI,CAAC,CAAC;;IAErB;IACA,OAAOhB,QAAQ,CAACG,UAAU,CACxBc,iCAAsB,EACtBC,yBAAc,EACdd,MAAM,EACNC,sBAAsB,EACtBC,s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