forked from InteractiveAdvertisingBureau/iabtcf-es
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
GVL 2.2 [InteractiveAdvertisingBureau#396 - from forked] (#6)
* add optional fields * schema version for GVL: v2 and v2.2 * add tests * fix GVL path * update v2.2 GVL to the latest version in testing * v1.5.7 * Assigned new package name iabtechlabtcf * corrected package version * v1.5.7 * v1.5.7 * v1.5.7 * Update to support TCF v2.2 (issue InteractiveAdvertisingBureau#388). Also fixed an error in the test script" --------- Co-authored-by: Sergei Sevriugin <sevriugin@gmail.com> Co-authored-by: Nitish Shelage <nitish.shelage@aitglobalinc.com> Co-authored-by: Heinz Baumann <heinz_baumann1@hotmail.com>
- Loading branch information
1 parent
55b2ca8
commit ba47cf4
Showing
96 changed files
with
21,061 additions
and
30 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
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('@iabtcf/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('@iabtcf/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
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
Oops, something went wrong.