-
Notifications
You must be signed in to change notification settings - Fork 96
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #396 from sevriugin/gvl-2.2
Update the getVendorList to support new v2.2 vendor list fields
- Loading branch information
Showing
98 changed files
with
21,066 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import {GVLMapItem} from './GVLMapItem.js'; | ||
|
||
export interface DataCategory extends GVLMapItem { | ||
description: string; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import {IntMap} from '../IntMap.js'; | ||
|
||
export interface DataRetention { | ||
stdRetention?: number; | ||
purposes: IntMap<number>; | ||
specialPurposes: IntMap<number>; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
export interface VendorUrl { | ||
langId: string; | ||
privacy: string; | ||
legIntClaim: string; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import {expect} from 'chai'; | ||
import {DataCategory} from '../../../src/model/gvl/DataCategory'; | ||
|
||
// eslint-disable-next-line @typescript-eslint/no-var-requires | ||
const vendorlistJson = require('@iabtechlabtcf/testing/lib/vendorlist/v2.2/vendor-list.json'); | ||
|
||
export function run(): void { | ||
|
||
describe('DataCategory', (): void => { | ||
|
||
it('must be present in GVL 2.2', (): void => { | ||
|
||
const {dataCategories, gvlSpecificationVersion} = vendorlistJson; | ||
|
||
expect(gvlSpecificationVersion).to.equal(3); | ||
|
||
Object.keys(dataCategories).forEach((key: string): void => { | ||
|
||
const dataCategory = dataCategories[key] as DataCategory; | ||
|
||
expect(dataCategory.id).to.equal(key); | ||
|
||
expect(dataCategory.name).to.be.a('string'); | ||
|
||
expect(dataCategory.description).to.be.a('string'); | ||
|
||
}); | ||
|
||
}); | ||
|
||
}); | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import {expect} from 'chai'; | ||
import {Vendor} from '../../../src/model/gvl/Vendor'; | ||
|
||
// eslint-disable-next-line @typescript-eslint/no-var-requires | ||
const vendorlistJson = require('@iabtechlabtcf/testing/lib/vendorlist/v2.2/vendor-list.json'); | ||
|
||
export function run(): void { | ||
|
||
describe('Vendor', (): void => { | ||
|
||
it('must contain new fields in GVL 2.2', (): void => { | ||
|
||
const {vendors, gvlSpecificationVersion} = vendorlistJson; | ||
|
||
expect(gvlSpecificationVersion).to.equal(3); | ||
|
||
Object.keys(vendors).forEach((key: string): void => { | ||
|
||
const vendor = vendors[key] as Vendor; | ||
|
||
expect(vendor.id).to.equal(key); | ||
|
||
const {dataRetention, urls, dataDeclaration} = vendor; | ||
|
||
expect(dataRetention).to.be.a('object'); | ||
|
||
expect(urls).to.be.a('object'); | ||
|
||
expect(dataDeclaration).to.be.a('object'); | ||
|
||
}); | ||
|
||
}); | ||
|
||
}); | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.