@adv-ui/boros-tcf

1.20.0 • Public • Published

THIS PACKAGE IS NOT LONGER UNDER MAINTENANCE ‼️‼️‼️‼️

Boros TCF

Build status codecov GitHub license npm version

Table of Contents

About

Boros TCF is a stand alone Consent Management Provider solution compliant with the "Transparency & Consent Framework version 2.0" standard established by the IAB Europe.

Features

  • Initialization with Stub, see details here

  • Extra cookie storage

    A cookie named "borosTcf" is stored with the user consents stringified data, encoded in Base64.

    Sample borosTcf value: eyJwb2xpY3lWZXJzaW9uIjoyLCJjbXBWZXJzaW9uIjoxLCJwdXJwb3NlIjp7ImNvbnNlbnRzIjp7IjEiOnRydWUsIjIiOnRydWUsIjMiOnRydWUsIjQiOnRydWUsIjUiOnRydWUsIjYiOnRydWUsIjciOnRydWUsIjgiOnRydWUsIjkiOnRydWUsIjEwIjp0cnVlfX0sInNwZWNpYWxGZWF0dXJlcyI6eyIxIjp0cnVlfX0=

    The encoded data in this sample value, and the cookie encoded data structure is:

    {
      "policyVersion": 2,
      "cmpVersion": 1,
      "purpose": {
        "consents": {
          "1": true,
          "2": true,
          "3": true,
          "4": true,
          "5": true,
          "6": true,
          "7": true,
          "8": true,
          "9": true,
          "10": true
        }
      },
      "specialFeatures": {
        "1": true
      }
    }
    

    To decode the cookie, p.ex.:

    // Java
    String decoded = new String(Base64.getDecoder().decode(cookieValue));
    
    // Node
    const decoded = Buffer.from(cookieValue, 'base64').toString()
    
    

npm i @adv-ui/boros-tcf

Initialization

import BorosTcf from '@adv-ui/boros-tcf'

const borosTcf = BorosTcf.init()

Allowed initialization parameters

BorosTcf.init({language, reporter})

  • language (optional, defaults to 'es'), a valid two-letter ISO 639-1 language code
  • reporter (optional), a function which can receive (event, payload) parameters. Boros TCF relevant actions will be notified to the reporter, which can be used p.ex. to debug.

Boros TCF actually will report events

  • LISTENER_ERROR: any error on registered event status listeners
  • USE_CASE_CALLED: any call to the use cases, which has finished OK
  • USE_CASE_ERROR: any call to the use cases, which has failed due to an error
  • LOAD_CONSENT_ERROR: loading the stored consent catched an error and an empty consent will be returned

License

Boros TCF is MIT licensed.

Package Sidebar

Install

npm i @adv-ui/boros-tcf

Weekly Downloads

11

Version

1.20.0

License

MIT

Unpacked Size

132 kB

Total Files

59

Last publish

Collaborators

  • andresadv
  • daniel.perez.ext
  • albert.peiro
  • frandelacasa-adevinta
  • mariapaula.forero.ext
  • sziauberyte
  • oriol.hilari
  • victor.perez.adevinta
  • carlos-barroso-ext
  • carolina.mallo.ext
  • carlos.gonzalezl
  • david.nieto
  • ferran.simon
  • alfredo.zimperz
  • sergi.quintela
  • jamile.radloff
  • luz_adv
  • ignacio.rodriguez
  • izaskunpena
  • carlosvillu-adevinta
  • andresin87.adevinta
  • adria.velardos
  • emiliovz
  • ruben-martin
  • cristina.rodriguez.duque
  • pol.valls
  • lolaruf
  • arturo.vicente
  • sergio.escano
  • marc.benito
  • tomasadevinta
  • alex.castells
  • beatrizip
  • pablo.rey-adevinta
  • sergiocollado
  • cristhianb
  • alisa_bayanova
  • chloe.leteinturier
  • davidmartin2108
  • estefania_garcia
  • belen.santos
  • alfredo.arronte
  • joanleon-adv
  • luis-garrido
  • giodelabarrera.adevinta
  • aitor.rodriguez
  • oscar_ramirez
  • jordi.munoz
  • ignacio_navarro
  • serena.mejias
  • luard-adv
  • izeller
  • alejandro.ferrante
  • oriol.egea
  • pa.chruscinski.ext
  • jenifer.lopez
  • a.ferrer
  • ivanmlaborda
  • daniela.aguilera
  • xavi_conejo
  • pablogs
  • javier.miguel
  • marian.lucaci
  • oriol.puig
  • hpintos_adevinta
  • nacho_torrella
  • isabelgomez87
  • sabri-castelli
  • xavi.murcia
  • mario.fernandez.ext
  • azahara
  • javiauso
  • francisco.ruiz.lloret
  • schibstedspain