diff --git a/src/iab.ts b/src/iab.ts index 5a08579..c7165d1 100644 --- a/src/iab.ts +++ b/src/iab.ts @@ -212,3 +212,21 @@ export const TcfV3VendorList = t.intersection([ * Type override */ export type TcfV3VendorList = t.TypeOf; + +export const NonTcfVendor = t.intersection([ + t.type({ + /** The vendor name */ + name: t.string, + /** The transcend purposes associated with each vendor */ + purposes: t.array(t.string) + }), + t.partial({ + /** The vendor description */ + description: t.string + }) +]); + +/** + * Type override + */ +export type NonTcfVendor = t.TypeOf; diff --git a/src/ui.ts b/src/ui.ts index 862b9a9..4fbe88f 100644 --- a/src/ui.ts +++ b/src/ui.ts @@ -14,6 +14,7 @@ import { DismissedViewState, } from './enums'; import { AirgapAuth } from './core'; +import { NonTcfVendor } from './iab'; /** Transcend Smart Quarantine API (window.transcend) */ export type PreInitTranscendAPI = { @@ -232,6 +233,8 @@ const TCFBundledDataConfig = t.partial({ purposeMap: t.array(t.tuple([t.number, t.array(t.string)])), /** These TCF purposes cannot be processed on the basis of legitimate interests */ restrictLegitimateInterestPurposes: t.array(t.number), + /** Vendors that Transcend Consent regulates because they haven't registered with IAB TCF */ + nonTcfVendors: t.array(NonTcfVendor) }); /** Type override */ @@ -252,21 +255,21 @@ export type TranscendView = Window & { }; export const DEFAULT_VIEW_STATE_BY_PRIVACY_REGIME: ExperienceToInitialViewState = - { - // EU - GDPR: InitialViewState.QuickOptions, - // Brazil - LGPD: InitialViewState.QuickOptions, - // Switzerland - nFADP: InitialViewState.QuickOptions, - // US: California - CPRA: InitialViewState.Hidden, - // US: Virginia - CDPA: InitialViewState.Hidden, - // US: Colorado - CPA: InitialViewState.Hidden, - // US: Nevada - NEVADA_SB220: InitialViewState.Hidden, - // Other - Unknown: InitialViewState.Hidden, - }; +{ + // EU + GDPR: InitialViewState.QuickOptions, + // Brazil + LGPD: InitialViewState.QuickOptions, + // Switzerland + nFADP: InitialViewState.QuickOptions, + // US: California + CPRA: InitialViewState.Hidden, + // US: Virginia + CDPA: InitialViewState.Hidden, + // US: Colorado + CPA: InitialViewState.Hidden, + // US: Nevada + NEVADA_SB220: InitialViewState.Hidden, + // Other + Unknown: InitialViewState.Hidden, +};