Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@financial-times/ads-personalised-consent

Package Overview
Dependencies
Maintainers
10
Versions
73
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@financial-times/ads-personalised-consent - npm Package Compare versions

Comparing version 5.0.1 to 5.1.0-beta.1

types.d.ts

47

dist/ads-personalised-consent.js
import { fetchLegislation } from '@financial-times/privacy-legislation-client';
/** @typedef {import("$typings/personalised-consent")} PersonalisedConsentTyping */
/** @type {PersonalisedConsentTyping.PersonalisedConsent} */
/**
* @typedef {import("..").RegionalCompliance} RegionalCompliance
* @typedef {import("..").ConsentInfo} ConsentInfo
* @typedef {import("..").Legislation} Legislation
* @typedef {import("..").Region} Region
*/
class PersonalisedConsent {
constructor() {
this.privacyLegislation = {
legislation: undefined,
region: undefined
};
this.gpcValue = false;
this.consentCookie = {
behavioral: false,
demographic: false,
programmatic: false
};
} // existing legislation policies
gpcValue = false;
/** @type {RegionalCompliance} */
privacyLegislation = {
legislation: undefined,
region: undefined
};
consentCookie = {
behavioral: false,
demographic: false,
programmatic: false
}; // existing legislation policies

@@ -45,3 +47,3 @@ static legislationPolicy = {

* by calling the 'fetchLegislation' function in package 'privacy-legislation-client'
* @returns {Promise<PersonalisedConsentTyping.PrivacyLegislation>}
* @returns {Promise<RegionalCompliance>}
*/

@@ -81,3 +83,3 @@

* updateConsentCookie method updates the consent settings from `FTConsent` cookie
* @returns {PersonalisedConsentTyping.ConsentInfo}
* @returns {ConsentInfo}
*/

@@ -137,3 +139,3 @@

* Otherwise, that type of personalised ads is allowed
* @returns {PersonalisedConsentTyping.ConsentInfo}
* @returns {ConsentInfo}
*/

@@ -152,3 +154,3 @@

* getLegislation method returns the legislation policies which the user is subject to
* @returns {PersonalisedConsentTyping.Legislation}
* @returns {Legislation}
*/

@@ -162,3 +164,3 @@

* getRegion method returns the region which the user is in
* @returns {PersonalisedConsentTyping.Region}
* @returns {Region}
*/

@@ -182,3 +184,3 @@

* (i.e. personalised ads consent choices in 'FTConsent' cookie)
* @returns {PersonalisedConsentTyping.ConsentInfo}
* @returns {ConsentInfo}
*/

@@ -194,6 +196,5 @@

* getPersonalisedConsent is a helper function that creates a new instance of PersonalisedConsent, and then returns it with all properties updated
* @returns {Promise<PersonalisedConsentTyping.PersonalisedConsent>}
* @returns {Promise<PersonalisedConsent>}
*/
const getPersonalisedConsent = async () => {

@@ -200,0 +201,0 @@ const pc = new PersonalisedConsent();

@@ -5,3 +5,11 @@ {

"type": "module",
"main": "dist/ads-personalised-consent.js",
"typings": "./types.d.ts",
"files": [
"dist/",
"types.d.ts"
],
"exports": {
".": "./dist/ads-personalised-consent.js"
},
"main": "./dist/ads-personalised-consent.js",
"dependencies": {

@@ -15,3 +23,3 @@ "@financial-times/privacy-legislation-client": "^1.0.0"

},
"version": "5.0.1"
"version": "5.1.0-beta.1"
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc