@didomi/react-native 1.6.0 → 1.10.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.
@@ -8,6 +8,6 @@ exports.DIDOMI_VERSION = exports.DIDOMI_USER_AGENT_NAME = void 0;
8
8
  const DIDOMI_USER_AGENT_NAME = "Didomi React-Native SDK"; // User agent version
9
9
 
10
10
  exports.DIDOMI_USER_AGENT_NAME = DIDOMI_USER_AGENT_NAME;
11
- const DIDOMI_VERSION = "1.6.0";
11
+ const DIDOMI_VERSION = "1.10.0";
12
12
  exports.DIDOMI_VERSION = DIDOMI_VERSION;
13
13
  //# sourceMappingURL=Constants.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["Constants.ts"],"names":["DIDOMI_USER_AGENT_NAME","DIDOMI_VERSION"],"mappings":";;;;;;AAAA;AACO,MAAMA,sBAAsB,GAAG,yBAA/B,C,CACP;;;AACO,MAAMC,cAAc,GAAG,OAAvB","sourcesContent":["// User agent name\nexport const DIDOMI_USER_AGENT_NAME = \"Didomi React-Native SDK\"\n// User agent version\nexport const DIDOMI_VERSION = \"1.6.0\"\n"]}
1
+ {"version":3,"sources":["Constants.ts"],"names":["DIDOMI_USER_AGENT_NAME","DIDOMI_VERSION"],"mappings":";;;;;;AAAA;AACO,MAAMA,sBAAsB,GAAG,yBAA/B,C,CACP;;;AACO,MAAMC,cAAc,GAAG,QAAvB","sourcesContent":["// User agent name\nexport const DIDOMI_USER_AGENT_NAME = \"Didomi React-Native SDK\"\n// User agent version\nexport const DIDOMI_VERSION = \"1.10.0\"\n"]}
@@ -22,16 +22,18 @@ const Didomi = {
22
22
  * @param localConfigurationPath: Path to your local config file. Defaults to didomi_config.json if null.
23
23
  * @param remoteConfigurationURL: URL to a remote configuration file to load during initialization. This parameter is not used yet. Set it to null for now.
24
24
  * @param providerId: Your provider ID (if any).
25
- * @param disableDidomiRemoteConfig: Whether to disable loading the remove configuration from the Didomi config. Keep this to "false" for loading configuration from the Didomi Console.
25
+ * @param disableDidomiRemoteConfig: Whether to disable loading the remote configuration from the Didomi config. Keep this to "false" for loading configuration from the Didomi Console.
26
26
  * @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.
27
27
  * @param noticeId: Notice id for the remote configuration.
28
+ * @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.
29
+ * @param androidTvEnabled: Whether to allow Didomi SDK to run on Android TV, default to "false".
28
30
  */
29
- initialize: (apiKey, localConfigurationPath, remoteConfigurationUrl, providerId, disableDidomiRemoteConfig = false, languageCode, noticeId) => {
31
+ initialize: (apiKey, localConfigurationPath, remoteConfigurationUrl, providerId, disableDidomiRemoteConfig = false, languageCode, noticeId, androidTvNoticeId, androidTvEnabled = false) => {
30
32
  // Init listener
31
33
  _DidomiListener.DidomiListener.init(); // Trigger native SDK init
32
34
 
33
35
 
34
- RNDidomi.initialize(_Constants.DIDOMI_USER_AGENT_NAME, _Constants.DIDOMI_VERSION, apiKey, localConfigurationPath, remoteConfigurationUrl, providerId, disableDidomiRemoteConfig, languageCode, noticeId);
36
+ return RNDidomi.initialize(_Constants.DIDOMI_USER_AGENT_NAME, _Constants.DIDOMI_VERSION, apiKey, localConfigurationPath, remoteConfigurationUrl, providerId, disableDidomiRemoteConfig, languageCode, noticeId, androidTvNoticeId, androidTvEnabled);
35
37
  },
36
38
 
37
39
  /**
@@ -94,48 +96,64 @@ const Didomi = {
94
96
  /**
95
97
  * Method used to get an array of disabled purposes.
96
98
  * @returns: array of disabled purposes.
99
+ * @deprecated use {@link #getUserStatus()} instead. The result of this method
100
+ * has been replaced by getUserStatus().getPurposes().getConsent().getDisabled().
97
101
  */
98
102
  getDisabledPurposes: () => RNDidomi.getDisabledPurposes(),
99
103
 
100
104
  /**
101
105
  * Method used to get a set of disabled purpose IDs.
102
106
  * @returns: set that contains the IDs of disabled purposes.
107
+ * @deprecated use {@link #getUserStatus()} instead. The result of this method
108
+ * has been replaced by getUserStatus().getPurposes().getConsent().getDisabled().
103
109
  */
104
110
  getDisabledPurposeIds: () => RNDidomi.getDisabledPurposeIds(),
105
111
 
106
112
  /**
107
113
  * Method used to get an array of disabled vendors.
108
114
  * @returns: array of disabled vendors.
115
+ * @deprecated use {@link #getUserStatus()} instead. The result of this method
116
+ * has been replaced by getUserStatus().getVendors().getConsent().getDisabled().
109
117
  */
110
118
  getDisabledVendors: () => RNDidomi.getDisabledVendors(),
111
119
 
112
120
  /**
113
121
  * Method used to get a set of disabled vendor IDs.
114
122
  * @returns: set that contains the IDs of disabled vendors.
123
+ * @deprecated use {@link #getUserStatus()} instead. The result of this method
124
+ * has been replaced by getUserStatus().getVendors().getConsent().getDisabled().
115
125
  */
116
126
  getDisabledVendorIds: () => RNDidomi.getDisabledVendorIds(),
117
127
 
118
128
  /**
119
129
  * Method used to get an array of enabled purposes.
120
130
  * @returns: array of enabled purposes.
131
+ * @deprecated use {@link #getUserStatus()} instead. The result of this method
132
+ * has been replaced by getUserStatus().getPurposes().getConsent().getEnabled().
121
133
  */
122
134
  getEnabledPurposes: () => RNDidomi.getEnabledPurposes(),
123
135
 
124
136
  /**
125
137
  * Method used to get a set of enabled purpose IDs.
126
138
  * @returns: set that contains the IDs of enabled purposes.
139
+ * @deprecated use {@link #getUserStatus()} instead. The result of this method
140
+ * has been replaced by getUserStatus().getPurposes().getConsent().getEnabled().
127
141
  */
128
142
  getEnabledPurposeIds: () => RNDidomi.getEnabledPurposeIds(),
129
143
 
130
144
  /**
131
145
  * Method used to get an array of enabled vendors.
132
146
  * @returns: array of enabled vendors.
147
+ * @deprecated use {@link #getUserStatus()} instead. The result of this method
148
+ * has been replaced by getUserStatus().getVendors().getConsent().getEnabled().
133
149
  */
134
150
  getEnabledVendors: () => RNDidomi.getEnabledVendors(),
135
151
 
136
152
  /**
137
153
  * Method used to get a set of enabled vendor IDs.
138
154
  * @returns: set that contains the IDs of enabled vendors.
155
+ * @deprecated use {@link #getUserStatus()} instead. The result of this method
156
+ * has been replaced by getUserStatus().getVendors().getConsent().getEnabled().
139
157
  */
140
158
  getEnabledVendorIds: () => RNDidomi.getEnabledVendorIds(),
141
159
 
@@ -338,6 +356,11 @@ const Didomi = {
338
356
  */
339
357
  isReady: () => RNDidomi.isReady(),
340
358
 
359
+ /**
360
+ * Clear user information
361
+ */
362
+ clearUser: () => RNDidomi.clearUser(),
363
+
341
364
  /**
342
365
  * Set user information without authentication
343
366
  *
@@ -347,7 +370,14 @@ const Didomi = {
347
370
  * @param salt Deprecated. To set user with authentication, use setUserWithHashAuth or setUserWithEncryptionAuth.
348
371
  * @param digest Deprecated. To set user with authentication, use setUserWithHashAuth or setUserWithEncryptionAuth.
349
372
  */
350
- setUser: (organizationUserId, organizationUserIdAuthAlgorithm, organizationUserIdAuthSid, organizationUserIdAuthSalt, organizationUserIdAuthDigest) => RNDidomi.setUser(organizationUserId, organizationUserIdAuthAlgorithm, organizationUserIdAuthSid, organizationUserIdAuthSalt, organizationUserIdAuthDigest),
373
+ setUser: (id, algorithm, secretId, salt, digest) => RNDidomi.setUser(id, algorithm, secretId, salt, digest),
374
+
375
+ /**
376
+ * Set user information without authentication and check for missing consent
377
+ *
378
+ * @param id Organization user ID
379
+ */
380
+ setUserAndSetupUI: id => RNDidomi.setUserAndSetupUI(id),
351
381
 
352
382
  /**
353
383
  * Set user information with Hash authentication
@@ -359,11 +389,29 @@ const Didomi = {
359
389
  * @param salt Salt used for computing the digest (optional)
360
390
  * @param expiration Expiration date as timestamp (to prevent replay attacks)
361
391
  */
362
- setUserWithHashAuth: (organizationUserId, algorithm, secretId, digest, salt, expiration) => {
392
+ setUserWithHashAuth: (id, algorithm, secretId, digest, salt, expiration) => {
363
393
  if (expiration === undefined) {
364
- RNDidomi.setUserWithHashAuth(organizationUserId, algorithm, secretId, digest, salt);
394
+ RNDidomi.setUserWithHashAuth(id, algorithm, secretId, digest, salt);
365
395
  } else {
366
- RNDidomi.setUserWithHashAuthWithExpiration(organizationUserId, algorithm, secretId, digest, salt, expiration);
396
+ RNDidomi.setUserWithHashAuthWithExpiration(id, algorithm, secretId, digest, salt, expiration);
397
+ }
398
+ },
399
+
400
+ /**
401
+ * Set user information with Hash authentication and check for missing consent
402
+ *
403
+ * @param id Organization user ID
404
+ * @param algorithm Algorithm used for computing the digest
405
+ * @param secretId ID of the secret used for computing the digest
406
+ * @param digest Digest of the organization user ID and secret
407
+ * @param salt Salt used for computing the digest (optional)
408
+ * @param expiration Expiration date as timestamp (to prevent replay attacks)
409
+ */
410
+ setUserWithHashAuthAndSetupUI: (id, algorithm, secretId, digest, salt, expiration) => {
411
+ if (expiration === undefined) {
412
+ RNDidomi.setUserWithHashAuthAndSetupUI(id, algorithm, secretId, digest, salt);
413
+ } else {
414
+ RNDidomi.setUserWithHashAuthWithExpirationAndSetupUI(id, algorithm, secretId, digest, salt, expiration);
367
415
  }
368
416
  },
369
417
 
@@ -376,11 +424,28 @@ const Didomi = {
376
424
  * @param initializationVector Initialization Vector used for computing the user ID
377
425
  * @param expiration Expiration date as timestamp (to prevent replay attacks)
378
426
  */
379
- setUserWithEncryptionAuth: (organizationUserId, algorithm, secretId, initializationVector, expiration) => {
427
+ setUserWithEncryptionAuth: (id, algorithm, secretId, initializationVector, expiration) => {
428
+ if (expiration === undefined) {
429
+ RNDidomi.setUserWithEncryptionAuth(id, algorithm, secretId, initializationVector);
430
+ } else {
431
+ RNDidomi.setUserWithEncryptionAuthWithExpiration(id, algorithm, secretId, initializationVector, expiration);
432
+ }
433
+ },
434
+
435
+ /**
436
+ * Set user information with Encryption authentication and check for missing consent
437
+ *
438
+ * @param id Organization user ID
439
+ * @param algorithm Algorithm used for computing the digest
440
+ * @param secretId ID of the secret used for computing the digest
441
+ * @param initializationVector Initialization Vector used for computing the user ID
442
+ * @param expiration Expiration date as timestamp (to prevent replay attacks)
443
+ */
444
+ setUserWithEncryptionAuthAndSetupUI: (id, algorithm, secretId, initializationVector, expiration) => {
380
445
  if (expiration === undefined) {
381
- RNDidomi.setUserWithEncryptionAuth(organizationUserId, algorithm, secretId, initializationVector);
446
+ RNDidomi.setUserWithEncryptionAuthAndSetupUI(id, algorithm, secretId, initializationVector);
382
447
  } else {
383
- RNDidomi.setUserWithEncryptionAuthWithExpiration(organizationUserId, algorithm, secretId, initializationVector, expiration);
448
+ RNDidomi.setUserWithEncryptionAuthWithExpirationAndSetupUI(id, algorithm, secretId, initializationVector, expiration);
384
449
  }
385
450
  },
386
451
 
@@ -1 +1 @@
1
- {"version":3,"sources":["Didomi.ts"],"names":["Didomi","RNDidomi","NativeModules","initialize","apiKey","localConfigurationPath","remoteConfigurationUrl","providerId","disableDidomiRemoteConfig","languageCode","noticeId","DidomiListener","init","DIDOMI_USER_AGENT_NAME","DIDOMI_VERSION","onReady","onError","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","setUser","organizationUserId","organizationUserIdAuthAlgorithm","organizationUserIdAuthSid","organizationUserIdAuthSalt","organizationUserIdAuthDigest","setUserWithHashAuth","algorithm","secretId","digest","salt","expiration","undefined","setUserWithHashAuthWithExpiration","setUserWithEncryptionAuth","initializationVector","setUserWithEncryptionAuthWithExpiration","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"],"mappings":";;;;;;;AAAA;;AACA;;AAEA;;AAEA,MAAM;AAAEA,EAAAA,MAAM,EAAEC;AAAV,IAAuBC,0BAA7B;AAEO,MAAMF,MAAM,GAAG;AACpB;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACEG,EAAAA,UAAU,EAAE,CACVC,MADU,EAEVC,sBAFU,EAGVC,sBAHU,EAIVC,UAJU,EAKVC,yBAAkC,GAAG,KAL3B,EAMVC,YANU,EAOVC,QAPU,KAQP;AACH;AACAC,mCAAeC,IAAf,GAFG,CAIH;;;AACAX,IAAAA,QAAQ,CAACE,UAAT,CACEU,iCADF,EAEEC,yBAFF,EAGEV,MAHF,EAIEC,sBAJF,EAKEC,sBALF,EAMEC,UANF,EAOEC,yBAPF,EAQEC,YARF,EASEC,QATF;AAWD,GApCmB;;AAsCpB;AACF;AACA;AACEK,EAAAA,OAAO,EAAE,MAAqBJ,+BAAeI,OAAf,EAzCV;;AA2CpB;AACF;AACA;AACEC,EAAAA,OAAO,EAAE,MAAoBL,+BAAeK,OAAf,EA9CT;;AAgDpB;AACF;AACA;AACEC,EAAAA,OAAO,EAAE,MAAqBhB,QAAQ,CAACgB,OAAT,EAnDV;;AAqDpB;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACEC,E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B,EAEjBC,yBAFiB,EAGjBC,mBAHiB,EAIjBC,oBAJiB,EAKjBC,uBALiB,EAMjBC,wBANiB,EAOjBC,kBAPiB,EAQjBC,mBARiB,KAUjBxG,QAAQ,CAACgG,iBAAT,CACEC,wBADF,EAEEC,yBAFF,EAGEC,mBAHF,EAIEC,oBAJF,EAKEC,uBALF,EAMEC,wBANF,EAOEC,kBAPF,EAQEC,mBARF,CAzhBkB;;AAoiBpB;AACF;AACA;AACA;AACEC,EAAAA,wBAAwB,EAAE,MACxBzG,QAAQ,CAACyG,wBAAT,EAziBkB;;AA2iBpB;AACF;AACA;AACA;AACA;AACA;AACEC,EAAAA,sBAAsB,EAAGlG,YAAD,IACtBR,QAAQ,CAAC0G,sBAAT,CAAgClG,YAAhC;AAljBkB,CAAf","sourcesContent":["import { NativeModules } from 'react-native';\nimport { DidomiListener } from './DidomiListener';\nimport { DidomiEventType } 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 remove 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 */\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 ) => {\n // Init listener\n DidomiListener.init();\n\n // Trigger native SDK init\n 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 );\n },\n\n /**\n * Listen to SDK ready state\n */\n onReady: (): Promise<void> => DidomiListener.onReady(),\n\n /**\n * Listen to SDK errors\n */\n onError: (): Promise<any> => DidomiListener.onError(),\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<number> => 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 */\n getDisabledPurposes: (): Promise<any[]> => 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 */\n getDisabledPurposeIds: (): Promise<any[]> => RNDidomi.getDisabledPurposeIds(),\n\n /**\n * Method used to get an array of disabled vendors.\n * @returns: array of disabled vendors.\n */\n getDisabledVendors: (): Promise<any[]> => 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 */\n getDisabledVendorIds: (): Promise<any[]> => RNDidomi.getDisabledVendorIds(),\n\n /**\n * Method used to get an array of enabled purposes.\n * @returns: array of enabled purposes.\n */\n getEnabledPurposes: (): Promise<any[]> => 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 */\n getEnabledPurposeIds: (): Promise<any[]> => RNDidomi.getEnabledPurposeIds(),\n\n /**\n * Method used to get an array of enabled vendors.\n * @returns: array of enabled vendors.\n */\n getEnabledVendors: (): Promise<any[]> => 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 */\n getEnabledVendorIds: (): Promise<any[]> => 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<any> => 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<any[]> => RNDidomi.getRequiredPurposes(),\n\n /**\n * Get the configured purpose IDs\n * @returns: set of purpose IDs.\n */\n getRequiredPurposeIds: (): Promise<any[]> => RNDidomi.getRequiredPurposeIds(),\n\n /**\n * Method used to get an array of required vendors.\n * @returns: array of required vendors.\n */\n getRequiredVendors: (): Promise<any[]> => RNDidomi.getRequiredVendors(),\n\n /**\n * Get the configured vendor IDs\n * @returns: set of vendor IDs.\n */\n getRequiredVendorIds: (): Promise<any[]> => 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().getPurposes().getConsent().getEnabled() or\n * getUserStatus().getPurposes().getConsent().getDisabled().\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().getVendors().getConsent().getEnabled() or\n * getUserStatus().getVendors().getConsent().getDisabled().\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().getVendors().getGlobalConsent().getEnabled() or\n * getUserStatus().getVendors().getGlobalConsent().getDisabled().\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().getPurposes().getLegitimateInterest().getEnabled() or\n * getUserStatus().getPurposes().getLegitimateInterest().getDisabled().\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().getVendors().getLegitimateInterest().getEnabled() or\n * getUserStatus().getVendors().getLegitimateInterest().getDisabled().\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().getVendors().getGlobalLegitimateInterest().getEnabled() or\n * getUserStatus().getVendors().getGlobalLegitimateInterest().getDisabled().\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<any> => 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().getVendors().getGlobal().getEnabled() or\n * getUserStatus().getVendors().getGlobal().getDisabled().\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<any> => 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 * 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 organizationUserId: string,\n organizationUserIdAuthAlgorithm?: string,\n organizationUserIdAuthSid?: string,\n organizationUserIdAuthSalt?: string,\n organizationUserIdAuthDigest?: string\n ): Promise<void> =>\n RNDidomi.setUser(\n organizationUserId,\n organizationUserIdAuthAlgorithm,\n organizationUserIdAuthSid,\n organizationUserIdAuthSalt,\n organizationUserIdAuthDigest\n ),\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 organizationUserId: 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 organizationUserId,\n algorithm,\n secretId,\n digest,\n salt\n );\n } else {\n RNDidomi.setUserWithHashAuthWithExpiration(\n organizationUserId,\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 organizationUserId: string,\n algorithm: string,\n secretId: string,\n initializationVector: string,\n expiration?: BigInt\n ): void => {\n if (expiration === undefined) {\n RNDidomi.setUserWithEncryptionAuth(\n organizationUserId,\n algorithm,\n secretId,\n initializationVector\n );\n } else {\n RNDidomi.setUserWithEncryptionAuthWithExpiration(\n organizationUserId,\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"]}
1
+ {"version":3,"sources":["Didomi.ts"],"names":["Didomi","RNDidomi","NativeModules","initialize","apiKey","localConfigurationPath","remoteConfigurationUrl","providerId","disableDidomiRemoteConfig","languageCode","noticeId","androidTvNoticeId","androidTvEnabled","DidomiListener","init","DIDOMI_USER_AGENT_NAME","DIDOMI_VERSION","onReady","onError","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"],"mappings":";;;;;;;AAAA;;AACA;;AAEA;;AAEA,MAAM;AAAEA,EAAAA,MAAM,EAAEC;AAAV,IAAuBC,0BAA7B;AAEO,MAAMF,MAAM,GAAG;AACpB;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACEG,EAAAA,UAAU,EAAE,CACVC,MADU,EAEVC,sBAFU,EAGVC,sBAHU,EAIVC,UAJU,EAKVC,yBAAkC,GAAG,KAL3B,EAMVC,YANU,EAOVC,QAPU,EAQVC,iBARU,EASVC,gBAAyB,GAAG,KATlB,KAUQ;AAClB;AACAC,mCAAeC,IAAf,GAFkB,CAIlB;;;AACA,WAAOb,QAAQ,CAACE,UAAT,CACLY,iCADK,EAELC,yBAF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BAHF,EAIEC,iBAJF,CA5kBkB;;AAmlBpB;AACF;AACA;AACA;AACEC,EAAAA,oBAAoB,EAAE,MAAwB9F,QAAQ,CAAC8F,oBAAT,EAvlB1B;;AAylBpB;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACEC,EAAAA,aAAa,EAAE,CACbC,qBADa,EAEbC,gBAFa,EAGbC,oBAHa,EAIbC,eAJa,KAMbnG,QAAQ,CAAC+F,aAAT,CACEC,qBADF,EAEEC,gBAFF,EAGEC,oBAHF,EAIEC,eAJF,CAvmBkB;;AA8mBpB;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACEC,EAAAA,iBAAiB,EAAE,CACjBC,wBADiB,EAEjBC,yBAFiB,EAGjBC,mBAHiB,EAIjBC,oBAJiB,EAKjBC,uBALiB,EAMjBC,wBANiB,EAOjBC,kBAPiB,EAQjBC,mBARiB,KAUjB5G,QAAQ,CAACoG,iBAAT,CACEC,wBADF,EAEEC,yBAFF,EAGEC,mBAHF,EAIEC,oBAJF,EAKEC,uBALF,EAMEC,wBANF,EAOEC,kBAPF,EAQEC,mBARF,CAnoBkB;;AA8oBpB;AACF;AACA;AACA;AACEC,EAAAA,wBAAwB,EAAE,MACxB7G,QAAQ,CAAC6G,wBAAT,EAnpBkB;;AAqpBpB;AACF;AACA;AACA;AACA;AACA;AACEC,EAAAA,sBAAsB,EAAGtG,YAAD,IACtBR,QAAQ,CAAC8G,sBAAT,CAAgCtG,YAAhC;AA5pBkB,CAAf","sourcesContent":["import { NativeModules } from 'react-native';\nimport { DidomiListener } from './DidomiListener';\nimport { DidomiEventType } 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> => DidomiListener.onReady(),\n\n /**\n * Listen to SDK errors\n */\n onError: (): Promise<any> => DidomiListener.onError(),\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().getPurposes().getConsent().getDisabled().\n */\n getDisabledPurposes: (): Promise<any[]> => 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().getPurposes().getConsent().getDisabled().\n */\n getDisabledPurposeIds: (): Promise<any[]> => 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().getVendors().getConsent().getDisabled().\n */\n getDisabledVendors: (): Promise<any[]> => 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().getVendors().getConsent().getDisabled().\n */\n getDisabledVendorIds: (): Promise<any[]> => 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().getPurposes().getConsent().getEnabled().\n */\n getEnabledPurposes: (): Promise<any[]> => 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().getPurposes().getConsent().getEnabled().\n */\n getEnabledPurposeIds: (): Promise<any[]> => 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().getVendors().getConsent().getEnabled().\n */\n getEnabledVendors: (): Promise<any[]> => 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().getVendors().getConsent().getEnabled().\n */\n getEnabledVendorIds: (): Promise<any[]> => 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<any> => 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<any[]> => RNDidomi.getRequiredPurposes(),\n\n /**\n * Get the configured purpose IDs\n * @returns: set of purpose IDs.\n */\n getRequiredPurposeIds: (): Promise<any[]> => RNDidomi.getRequiredPurposeIds(),\n\n /**\n * Method used to get an array of required vendors.\n * @returns: array of required vendors.\n */\n getRequiredVendors: (): Promise<any[]> => RNDidomi.getRequiredVendors(),\n\n /**\n * Get the configured vendor IDs\n * @returns: set of vendor IDs.\n */\n getRequiredVendorIds: (): Promise<any[]> => 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().getPurposes().getConsent().getEnabled() or\n * getUserStatus().getPurposes().getConsent().getDisabled().\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().getVendors().getConsent().getEnabled() or\n * getUserStatus().getVendors().getConsent().getDisabled().\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().getVendors().getGlobalConsent().getEnabled() or\n * getUserStatus().getVendors().getGlobalConsent().getDisabled().\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().getPurposes().getLegitimateInterest().getEnabled() or\n * getUserStatus().getPurposes().getLegitimateInterest().getDisabled().\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().getVendors().getLegitimateInterest().getEnabled() or\n * getUserStatus().getVendors().getLegitimateInterest().getDisabled().\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().getVendors().getGlobalLegitimateInterest().getEnabled() or\n * getUserStatus().getVendors().getGlobalLegitimateInterest().getDisabled().\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<any> => 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().getVendors().getGlobal().getEnabled() or\n * getUserStatus().getVendors().getGlobal().getDisabled().\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<any> => 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"]}
@@ -40,5 +40,7 @@ exports.DidomiEventType = DidomiEventType;
40
40
  DidomiEventType["PREFERENCES_CLICK_RESET_ALL_PURPOSES"] = "on_preferences_click_reset_all_purposes";
41
41
  DidomiEventType["SYNC_DONE"] = "on_sync_done";
42
42
  DidomiEventType["SYNC_ERROR"] = "on_sync_error";
43
+ DidomiEventType["LANGUAGE_UPDATED"] = "on_language_updated";
44
+ DidomiEventType["LANGUAGE_UPDATE_FAILED"] = "on_language_update_failed";
43
45
  })(DidomiEventType || (exports.DidomiEventType = DidomiEventType = {}));
44
46
  //# sourceMappingURL=DidomiTypes.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["DidomiTypes.ts"],"names":["DidomiEventType"],"mappings":";;;;;;AAAA;IACYA,e;;;WAAAA,e;AAAAA,EAAAA,e;AAAAA,EAAAA,e;AAAAA,EAAAA,e;AAAAA,EAAAA,e;AAAAA,EAAAA,e;AAAAA,EAAAA,e;AAAAA,EAAAA,e;AAAAA,EAAAA,e;AAAAA,EAAAA,e;AAAAA,EAAAA,e;AAAAA,EAAAA,e;AAAAA,EAAAA,e;AAAAA,EAAAA,e;AAAAA,EAAAA,e;AAAAA,EAAAA,e;AAAAA,EAAAA,e;AAAAA,EAAAA,e;AAAAA,EAAAA,e;AAAAA,EAAAA,e;AAAAA,EAAAA,e;AAAAA,EAAAA,e;AAAAA,EAAAA,e;AAAAA,EAAAA,e;AAAAA,EAAAA,e;AAAAA,EAAAA,e;AAAAA,EAAAA,e;AAAAA,EAAAA,e;AAAAA,EAAAA,e;AAAAA,EAAAA,e;AAAAA,EAAAA,e;AAAAA,EAAAA,e;GAAAA,e,+BAAAA,e","sourcesContent":["// TODO\nexport enum DidomiEventType {\n READY = 'on_ready',\n ERROR = 'on_error',\n CONSENT_CHANGED = 'on_consent_changed',\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_MORE_INFO = 'on_notice_click_more_info',\n NOTICE_CLICK_VIEW_VENDORS = 'on_notice_click_view_vendors',\n NOTICE_CLICK_PRIVACY_POLICY = 'on_notice_click_privacy_policy',\n HIDE_PREFERENCES = 'on_hide_preferences',\n SHOW_PREFERENCES = 'on_show_preferences',\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_PURPOSE_AGREE = 'on_preferences_click_purpose_agree',\n PREFERENCES_CLICK_PURPOSE_DISAGREE = 'on_preferences_click_purpose_disagree',\n PREFERENCES_CLICK_VIEW_VENDORS = 'on_preferences_click_view_vendors',\n PREFERENCES_CLICK_SAVE_CHOICES = 'on_preferences_click_save_choices',\n PREFERENCES_CLICK_VENDOR_AGREE = 'on_preferences_click_vendor_agree',\n PREFERENCES_CLICK_VENDOR_DISAGREE = 'on_preferences_click_vendor_disagree',\n PREFERENCES_CLICK_CATEGORY_AGREE = 'on_preferences_click_category_agree',\n PREFERENCES_CLICK_CATEGORY_DISAGREE = 'on_preferences_click_category_disagree',\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_SAVE_CHOICES = 'on_preferences_click_vendor_save_choices',\n PREFERENCES_CLICK_VIEW_PURPOSES = 'on_preferences_click_view_purposes',\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 SYNC_DONE = 'on_sync_done',\n SYNC_ERROR = 'on_sync_error',\n}\n\nexport interface Vendor {\n id: string;\n name: string;\n privacyPolicyUrl: string;\n namespace: string;\n namespaces: VendorNamespaces;\n iabVendor: boolean;\n purposeId: string[];\n legIntPurposeIds: string[];\n essentialPurposeIds: string[];\n}\n\nexport interface VendorNamespaces {\n iab2: string;\n}\n\nexport interface Purpose {\n id: string;\n iabId: string;\n name: string;\n description: string;\n descriptionLegal: 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 idpurposeId: string;\n icon: string;\n type: string;\n name: Map<string>;\n namedescription: 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 userId: string;\n created: string;\n updated: string;\n consentString: string;\n additionalConsent: string;\n}\n\nexport interface UserStatusPurposes {\n global: UserStatusIds;\n consent: UserStatusIds;\n legitimateInterest: UserStatusIds;\n essential: UserStatusIds;\n}\n\nexport interface UserStatusVendors {\n global: UserStatusIds;\n globalConsent: UserStatusIds;\n globalLegitimateInterest: UserStatusIds;\n consent: UserStatusIds;\n legitimateInterest: UserStatusIds;\n}\n\nexport interface UserStatusIds {\n disabled: string[];\n enabled: string[];\n}\n"]}
1
+ {"version":3,"sources":["DidomiTypes.ts"],"names":["DidomiEventType"],"mappings":";;;;;;AAAA;IACYA,e;;;WAAAA,e;AAAAA,EAAAA,e;AAAAA,EAAAA,e;AAAAA,EAAAA,e;AAAAA,EAAAA,e;AAAAA,EAAAA,e;AAAAA,EAAAA,e;AAAAA,EAAAA,e;AAAAA,EAAAA,e;AAAAA,EAAAA,e;AAAAA,EAAAA,e;AAAAA,EAAAA,e;AAAAA,EAAAA,e;AAAAA,EAAAA,e;AAAAA,EAAAA,e;AAAAA,EAAAA,e;AAAAA,EAAAA,e;AAAAA,EAAAA,e;AAAAA,EAAAA,e;AAAAA,EAAAA,e;AAAAA,EAAAA,e;AAAAA,EAAAA,e;AAAAA,EAAAA,e;AAAAA,EAAAA,e;AAAAA,EAAAA,e;AAAAA,EAAAA,e;AAAAA,EAAAA,e;AAAAA,EAAAA,e;AAAAA,EAAAA,e;AAAAA,EAAAA,e;AAAAA,EAAAA,e;AAAAA,EAAAA,e;AAAAA,EAAAA,e;AAAAA,EAAAA,e;GAAAA,e,+BAAAA,e","sourcesContent":["// TODO\nexport enum DidomiEventType {\n READY = 'on_ready',\n ERROR = 'on_error',\n CONSENT_CHANGED = 'on_consent_changed',\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_MORE_INFO = 'on_notice_click_more_info',\n NOTICE_CLICK_VIEW_VENDORS = 'on_notice_click_view_vendors',\n NOTICE_CLICK_PRIVACY_POLICY = 'on_notice_click_privacy_policy',\n HIDE_PREFERENCES = 'on_hide_preferences',\n SHOW_PREFERENCES = 'on_show_preferences',\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_PURPOSE_AGREE = 'on_preferences_click_purpose_agree',\n PREFERENCES_CLICK_PURPOSE_DISAGREE = 'on_preferences_click_purpose_disagree',\n PREFERENCES_CLICK_VIEW_VENDORS = 'on_preferences_click_view_vendors',\n PREFERENCES_CLICK_SAVE_CHOICES = 'on_preferences_click_save_choices',\n PREFERENCES_CLICK_VENDOR_AGREE = 'on_preferences_click_vendor_agree',\n PREFERENCES_CLICK_VENDOR_DISAGREE = 'on_preferences_click_vendor_disagree',\n PREFERENCES_CLICK_CATEGORY_AGREE = 'on_preferences_click_category_agree',\n PREFERENCES_CLICK_CATEGORY_DISAGREE = 'on_preferences_click_category_disagree',\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_SAVE_CHOICES = 'on_preferences_click_vendor_save_choices',\n PREFERENCES_CLICK_VIEW_PURPOSES = 'on_preferences_click_view_purposes',\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 SYNC_DONE = 'on_sync_done',\n SYNC_ERROR = 'on_sync_error',\n LANGUAGE_UPDATED = \"on_language_updated\",\n LANGUAGE_UPDATE_FAILED = \"on_language_update_failed\",\n}\n\nexport interface Vendor {\n id: string;\n name: string;\n privacyPolicyUrl: string;\n namespace: string;\n namespaces: VendorNamespaces;\n iabVendor: boolean;\n purposeId: string[];\n legIntPurposeIds: string[];\n essentialPurposeIds: string[];\n}\n\nexport interface VendorNamespaces {\n iab2: string;\n}\n\nexport interface Purpose {\n id: string;\n iabId: string;\n name: string;\n description: string;\n descriptionLegal: 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 idpurposeId: string;\n icon: string;\n type: string;\n name: Map<string>;\n namedescription: 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 userId: string;\n created: string;\n updated: string;\n consentString: string;\n additionalConsent: string;\n regulation: string;\n}\n\nexport interface UserStatusPurposes {\n global: UserStatusIds;\n consent: UserStatusIds;\n legitimateInterest: UserStatusIds;\n essential: UserStatusIds;\n}\n\nexport interface UserStatusVendors {\n global: UserStatusIds;\n globalConsent: UserStatusIds;\n globalLegitimateInterest: UserStatusIds;\n consent: UserStatusIds;\n legitimateInterest: UserStatusIds;\n}\n\nexport interface UserStatusIds {\n disabled: string[];\n enabled: string[];\n}\n"]}
@@ -1,5 +1,5 @@
1
1
  // User agent name
2
2
  export const DIDOMI_USER_AGENT_NAME = "Didomi React-Native SDK"; // User agent version
3
3
 
4
- export const DIDOMI_VERSION = "1.6.0";
4
+ export const DIDOMI_VERSION = "1.10.0";
5
5
  //# sourceMappingURL=Constants.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["Constants.ts"],"names":["DIDOMI_USER_AGENT_NAME","DIDOMI_VERSION"],"mappings":"AAAA;AACA,OAAO,MAAMA,sBAAsB,GAAG,yBAA/B,C,CACP;;AACA,OAAO,MAAMC,cAAc,GAAG,OAAvB","sourcesContent":["// User agent name\nexport const DIDOMI_USER_AGENT_NAME = \"Didomi React-Native SDK\"\n// User agent version\nexport const DIDOMI_VERSION = \"1.6.0\"\n"]}
1
+ {"version":3,"sources":["Constants.ts"],"names":["DIDOMI_USER_AGENT_NAME","DIDOMI_VERSION"],"mappings":"AAAA;AACA,OAAO,MAAMA,sBAAsB,GAAG,yBAA/B,C,CACP;;AACA,OAAO,MAAMC,cAAc,GAAG,QAAvB","sourcesContent":["// User agent name\nexport const DIDOMI_USER_AGENT_NAME = \"Didomi React-Native SDK\"\n// User agent version\nexport const DIDOMI_VERSION = \"1.10.0\"\n"]}
@@ -12,15 +12,17 @@ export const Didomi = {
12
12
  * @param localConfigurationPath: Path to your local config file. Defaults to didomi_config.json if null.
13
13
  * @param remoteConfigurationURL: URL to a remote configuration file to load during initialization. This parameter is not used yet. Set it to null for now.
14
14
  * @param providerId: Your provider ID (if any).
15
- * @param disableDidomiRemoteConfig: Whether to disable loading the remove configuration from the Didomi config. Keep this to "false" for loading configuration from the Didomi Console.
15
+ * @param disableDidomiRemoteConfig: Whether to disable loading the remote configuration from the Didomi config. Keep this to "false" for loading configuration from the Didomi Console.
16
16
  * @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.
17
17
  * @param noticeId: Notice id for the remote configuration.
18
+ * @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.
19
+ * @param androidTvEnabled: Whether to allow Didomi SDK to run on Android TV, default to "false".
18
20
  */
19
- initialize: (apiKey, localConfigurationPath, remoteConfigurationUrl, providerId, disableDidomiRemoteConfig = false, languageCode, noticeId) => {
21
+ initialize: (apiKey, localConfigurationPath, remoteConfigurationUrl, providerId, disableDidomiRemoteConfig = false, languageCode, noticeId, androidTvNoticeId, androidTvEnabled = false) => {
20
22
  // Init listener
21
23
  DidomiListener.init(); // Trigger native SDK init
22
24
 
23
- RNDidomi.initialize(DIDOMI_USER_AGENT_NAME, DIDOMI_VERSION, apiKey, localConfigurationPath, remoteConfigurationUrl, providerId, disableDidomiRemoteConfig, languageCode, noticeId);
25
+ return RNDidomi.initialize(DIDOMI_USER_AGENT_NAME, DIDOMI_VERSION, apiKey, localConfigurationPath, remoteConfigurationUrl, providerId, disableDidomiRemoteConfig, languageCode, noticeId, androidTvNoticeId, androidTvEnabled);
24
26
  },
25
27
 
26
28
  /**
@@ -83,48 +85,64 @@ export const Didomi = {
83
85
  /**
84
86
  * Method used to get an array of disabled purposes.
85
87
  * @returns: array of disabled purposes.
88
+ * @deprecated use {@link #getUserStatus()} instead. The result of this method
89
+ * has been replaced by getUserStatus().getPurposes().getConsent().getDisabled().
86
90
  */
87
91
  getDisabledPurposes: () => RNDidomi.getDisabledPurposes(),
88
92
 
89
93
  /**
90
94
  * Method used to get a set of disabled purpose IDs.
91
95
  * @returns: set that contains the IDs of disabled purposes.
96
+ * @deprecated use {@link #getUserStatus()} instead. The result of this method
97
+ * has been replaced by getUserStatus().getPurposes().getConsent().getDisabled().
92
98
  */
93
99
  getDisabledPurposeIds: () => RNDidomi.getDisabledPurposeIds(),
94
100
 
95
101
  /**
96
102
  * Method used to get an array of disabled vendors.
97
103
  * @returns: array of disabled vendors.
104
+ * @deprecated use {@link #getUserStatus()} instead. The result of this method
105
+ * has been replaced by getUserStatus().getVendors().getConsent().getDisabled().
98
106
  */
99
107
  getDisabledVendors: () => RNDidomi.getDisabledVendors(),
100
108
 
101
109
  /**
102
110
  * Method used to get a set of disabled vendor IDs.
103
111
  * @returns: set that contains the IDs of disabled vendors.
112
+ * @deprecated use {@link #getUserStatus()} instead. The result of this method
113
+ * has been replaced by getUserStatus().getVendors().getConsent().getDisabled().
104
114
  */
105
115
  getDisabledVendorIds: () => RNDidomi.getDisabledVendorIds(),
106
116
 
107
117
  /**
108
118
  * Method used to get an array of enabled purposes.
109
119
  * @returns: array of enabled purposes.
120
+ * @deprecated use {@link #getUserStatus()} instead. The result of this method
121
+ * has been replaced by getUserStatus().getPurposes().getConsent().getEnabled().
110
122
  */
111
123
  getEnabledPurposes: () => RNDidomi.getEnabledPurposes(),
112
124
 
113
125
  /**
114
126
  * Method used to get a set of enabled purpose IDs.
115
127
  * @returns: set that contains the IDs of enabled purposes.
128
+ * @deprecated use {@link #getUserStatus()} instead. The result of this method
129
+ * has been replaced by getUserStatus().getPurposes().getConsent().getEnabled().
116
130
  */
117
131
  getEnabledPurposeIds: () => RNDidomi.getEnabledPurposeIds(),
118
132
 
119
133
  /**
120
134
  * Method used to get an array of enabled vendors.
121
135
  * @returns: array of enabled vendors.
136
+ * @deprecated use {@link #getUserStatus()} instead. The result of this method
137
+ * has been replaced by getUserStatus().getVendors().getConsent().getEnabled().
122
138
  */
123
139
  getEnabledVendors: () => RNDidomi.getEnabledVendors(),
124
140
 
125
141
  /**
126
142
  * Method used to get a set of enabled vendor IDs.
127
143
  * @returns: set that contains the IDs of enabled vendors.
144
+ * @deprecated use {@link #getUserStatus()} instead. The result of this method
145
+ * has been replaced by getUserStatus().getVendors().getConsent().getEnabled().
128
146
  */
129
147
  getEnabledVendorIds: () => RNDidomi.getEnabledVendorIds(),
130
148
 
@@ -327,6 +345,11 @@ export const Didomi = {
327
345
  */
328
346
  isReady: () => RNDidomi.isReady(),
329
347
 
348
+ /**
349
+ * Clear user information
350
+ */
351
+ clearUser: () => RNDidomi.clearUser(),
352
+
330
353
  /**
331
354
  * Set user information without authentication
332
355
  *
@@ -336,7 +359,14 @@ export const Didomi = {
336
359
  * @param salt Deprecated. To set user with authentication, use setUserWithHashAuth or setUserWithEncryptionAuth.
337
360
  * @param digest Deprecated. To set user with authentication, use setUserWithHashAuth or setUserWithEncryptionAuth.
338
361
  */
339
- setUser: (organizationUserId, organizationUserIdAuthAlgorithm, organizationUserIdAuthSid, organizationUserIdAuthSalt, organizationUserIdAuthDigest) => RNDidomi.setUser(organizationUserId, organizationUserIdAuthAlgorithm, organizationUserIdAuthSid, organizationUserIdAuthSalt, organizationUserIdAuthDigest),
362
+ setUser: (id, algorithm, secretId, salt, digest) => RNDidomi.setUser(id, algorithm, secretId, salt, digest),
363
+
364
+ /**
365
+ * Set user information without authentication and check for missing consent
366
+ *
367
+ * @param id Organization user ID
368
+ */
369
+ setUserAndSetupUI: id => RNDidomi.setUserAndSetupUI(id),
340
370
 
341
371
  /**
342
372
  * Set user information with Hash authentication
@@ -348,11 +378,29 @@ export const Didomi = {
348
378
  * @param salt Salt used for computing the digest (optional)
349
379
  * @param expiration Expiration date as timestamp (to prevent replay attacks)
350
380
  */
351
- setUserWithHashAuth: (organizationUserId, algorithm, secretId, digest, salt, expiration) => {
381
+ setUserWithHashAuth: (id, algorithm, secretId, digest, salt, expiration) => {
352
382
  if (expiration === undefined) {
353
- RNDidomi.setUserWithHashAuth(organizationUserId, algorithm, secretId, digest, salt);
383
+ RNDidomi.setUserWithHashAuth(id, algorithm, secretId, digest, salt);
354
384
  } else {
355
- RNDidomi.setUserWithHashAuthWithExpiration(organizationUserId, algorithm, secretId, digest, salt, expiration);
385
+ RNDidomi.setUserWithHashAuthWithExpiration(id, algorithm, secretId, digest, salt, expiration);
386
+ }
387
+ },
388
+
389
+ /**
390
+ * Set user information with Hash authentication and check for missing consent
391
+ *
392
+ * @param id Organization user ID
393
+ * @param algorithm Algorithm used for computing the digest
394
+ * @param secretId ID of the secret used for computing the digest
395
+ * @param digest Digest of the organization user ID and secret
396
+ * @param salt Salt used for computing the digest (optional)
397
+ * @param expiration Expiration date as timestamp (to prevent replay attacks)
398
+ */
399
+ setUserWithHashAuthAndSetupUI: (id, algorithm, secretId, digest, salt, expiration) => {
400
+ if (expiration === undefined) {
401
+ RNDidomi.setUserWithHashAuthAndSetupUI(id, algorithm, secretId, digest, salt);
402
+ } else {
403
+ RNDidomi.setUserWithHashAuthWithExpirationAndSetupUI(id, algorithm, secretId, digest, salt, expiration);
356
404
  }
357
405
  },
358
406
 
@@ -365,11 +413,28 @@ export const Didomi = {
365
413
  * @param initializationVector Initialization Vector used for computing the user ID
366
414
  * @param expiration Expiration date as timestamp (to prevent replay attacks)
367
415
  */
368
- setUserWithEncryptionAuth: (organizationUserId, algorithm, secretId, initializationVector, expiration) => {
416
+ setUserWithEncryptionAuth: (id, algorithm, secretId, initializationVector, expiration) => {
417
+ if (expiration === undefined) {
418
+ RNDidomi.setUserWithEncryptionAuth(id, algorithm, secretId, initializationVector);
419
+ } else {
420
+ RNDidomi.setUserWithEncryptionAuthWithExpiration(id, algorithm, secretId, initializationVector, expiration);
421
+ }
422
+ },
423
+
424
+ /**
425
+ * Set user information with Encryption authentication and check for missing consent
426
+ *
427
+ * @param id Organization user ID
428
+ * @param algorithm Algorithm used for computing the digest
429
+ * @param secretId ID of the secret used for computing the digest
430
+ * @param initializationVector Initialization Vector used for computing the user ID
431
+ * @param expiration Expiration date as timestamp (to prevent replay attacks)
432
+ */
433
+ setUserWithEncryptionAuthAndSetupUI: (id, algorithm, secretId, initializationVector, expiration) => {
369
434
  if (expiration === undefined) {
370
- RNDidomi.setUserWithEncryptionAuth(organizationUserId, algorithm, secretId, initializationVector);
435
+ RNDidomi.setUserWithEncryptionAuthAndSetupUI(id, algorithm, secretId, initializationVector);
371
436
  } else {
372
- RNDidomi.setUserWithEncryptionAuthWithExpiration(organizationUserId, algorithm, secretId, initializationVector, expiration);
437
+ RNDidomi.setUserWithEncryptionAuthWithExpirationAndSetupUI(id, algorithm, secretId, initializationVector, expiration);
373
438
  }
374
439
  },
375
440