Deprecated
User Status
getDisabledPurposes
Removed since version 2.0.0, use getCurrentUserStatus instead.
The result of this method has been replaced by getUserStatus().purposes.consent.disabled
.
getDisabledPurposeIds
Removed since version 2.0.0, use getCurrentUserStatus instead.
The result of this method has been replaced by getUserStatus().purposes.consent.disabled
.
getDisabledVendors
Removed since version 2.0.0, use getCurrentUserStatus instead.
The result of this method has been replaced by getUserStatus().vendors.consent.disabled
.
getDisabledVendorIds
Removed since version 2.0.0, use getCurrentUserStatus instead.
The result of this method has been replaced by getUserStatus().vendors.consent.disabled
.
getEnabledPurposes
Removed since version 2.0.0, use getCurrentUserStatus instead.
The result of this method has been replaced by getUserStatus().purposes.global.enabled
.
getEnabledPurposeIds
Removed since version 2.0.0, use getCurrentUserStatus instead.
The result of this method has been replaced by getUserStatus().purposes.global.enabled
.
getEnabledVendors
Removed since version 2.0.0, use getCurrentUserStatus instead.
The result of this method has been replaced by getUserStatus().vendors.consent.enabled
.
getEnabledVendorIds
Removed since version 2.0.0, use getCurrentUserStatus instead.
The result of this method has been replaced by getUserStatus().vendors.consent.enabled
.
getUserConsentStatusForPurpose
Deprecated, use getCurrentUserStatus instead.
Search the purposeId in getUserStatus().purposes.consent.enabled
or getUserStatus().purposes.consent.disabled
.
Get the user consent status for a given purpose. You must also check that the user has given consent to a vendor before being able to load a vendor.
Parameters
purposeId
string
The ID of the purpose to check the user consent for
Returns
A Promise<boolean>
that indicates if the user has given consent or not to the specific purpose.
undefined
is returned if the consent status is not known yet. From a GDPR perspective, you'll want to treat undefined
as false
(ie no consent given) but it is helpful to know that the user has not interacted with the consent UI yet so that you can subscribe to events and wait for consent information to be collected.
If consent is not required because GDPR does not apply to that user, this function will return true
.
Example
getUserConsentStatusForVendor
Removed since version 2.0.0, use getCurrentUserStatus instead.
Search the vendorId in getUserStatus().vendors.consent.enabled
or getUserStatus().vendors.consent.disabled
.
getUserConsentStatusForVendorAndRequiredPurposes
Removed since version 2.0.0, use getCurrentUserStatus instead.
Search the purposeId in getUserStatus().vendors.global_consent.enabled
or getUserStatus().vendors.global_consent.disabled
.
getUserLegitimateInterestStatusForPurpose
Removed since version 2.0.0, use getCurrentUserStatus instead.
Search the purposeId in getUserStatus().purposes.legitimate_interest.enabled
or getUserStatus().purposes.legitimate_interest.disabled
.
getUserLegitimateInterestForVendor
Removed since version 2.0.0, use getCurrentUserStatus instead.
Search the vendorId in getUserStatus().vendors.legitimate_interest.enabled
or getUserStatus().vendors.legitimate_interest.disabled
.
getUserLegitimateInterestStatusForVendorAndRequiredPurposes
Removed since version 2.0.0, use getCurrentUserStatus instead.
Search the vendorId in getUserStatus().vendors.global_legitimate_interest.enabled
or getUserStatus().vendors.global_legitimate_interest.disabled
.
getUserStatus
Deprecated, use getCurrentUserStatus instead.
Get all the user consent status.
Returns
A UserStatus
object describing all the available and computed user information.
purposes.global.disabled
string[]
Computed sets/lists of disabled IDs of purposes that have been chosen by the user regarding the consent or legitimate interest Legal Basis.
purposes.global.enabled
string[]
Computed sets/lists of enabled IDs of purposes that have been chosen by the user regarding the consent or legitimate interest Legal Basis. Purposes considered as essential will be part of the enabled IDs.
purposes.consent.disabled
string[]
Disabled IDs of purposes that have been explicitly chosen by the user regarding the consent Legal Basis.
purposes.consent.enabled
string[]
Enabled IDs of purposes that have been explicitly chosen by the user regarding the consent Legal Basis.
purposes.legitimate_interest.disabled
string[]
Disabled IDs of purposes that have been explicitly chosen by the user regarding the legitimate interest Legal Basis.
purposes.legitimate_interest.enabled
string[]
Enabled IDs of purposes that have been explicitly chosen by the user regarding the legitimate interest Legal Basis.
purposes.essential
string[]
IDs of purposes that are considered essential.
vendors.global.disabled
string[]
Computed sets/lists of disabled IDs of vendors that have been chosen by the user regarding the consent or legitimate interest Legal Basis. This takes into account the consent and legitimate interest required purposes linked to vendors. When computing this property, essential purposes will be considered as enabled.
vendors.global.enabled
string[]
Computed sets/lists of enabled IDs of vendors that have been chosen by the user regarding the consent or legitimate interest Legal Basis. This takes into account the consent and legitimate interest required purposes linked to vendors. When computing this property, essential purposes will be considered as enabled.
vendors.global_consent.disabled
string[]
Computed sets/lists of disabled IDs of vendors that have been chosen by the user regarding the consent Legal Basis. This takes into account the consent required purposes linked to vendors. When computing this property, essential purposes will be considered as enabled.
vendors.global_consent.enabled
string[]
Computed sets/lists of enabled IDs of vendors that have been chosen by the user regarding the consent Legal Basis. This takes into account the consent required purposes linked to vendors. When computing this property, essential purposes will be considered as enabled.
vendors.global_legitimate_interest.disabled
string[]
Computed sets/lists of disabled IDs of vendors that have been chosen by the user regarding the legitimate interest Legal Basis. This takes into account the legitimate interest required purposes linked to vendors. When computing this property, essential purposes will be considered as enabled.
vendors.global_legitimate___interest.enabled
string[]
Computed sets/lists of enabled IDs of vendors that have been chosen by the user regarding the legitimate interest Legal Basis. This takes into account the legitimate interest required purposes linked to vendors. When computing this property, essential purposes will be considered as enabled.
vendors.consent.disabled
string[]
Disabled IDs of vendors that have been explicitly chosen by the user regarding the consent Legal Basis.
vendors.consent.enabled
string[]
Enabled IDs of vendors that have been explicitly chosen by the user regarding the consent Legal Basis.
vendors.legitimate_interest.disabled
string[]
Disabled IDs of vendors that have been explicitly chosen by the user regarding the legitimate interest Legal Basis.
vendors.legitimate_interest.enabled
string[]
Enabled IDs of vendors that have been explicitly chosen by the user regarding the legitimate interest Legal Basis.
user_id
String
Didomi user id.
created
String
User choices creation date.
updated
String
User choices update date.
consent_string
String
TFC consent as string.
additional_consent
String
Example
getUserStatusForVendor
Removed since version 2.0.0, use getCurrentUserStatus instead.
Search the vendorId in getUserStatus().vendors.global.enabled
or getUserStatus().vendors.global.disabled
.
Last updated