-
Notifications
You must be signed in to change notification settings - Fork 95
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Possible sdk (1.5.10)/vendor list (21) incompatibility issue #426
Comments
Hello, @adafee15, thanks for rising the issue. I have tried to check with the lates version of the GVL https://vendor-list.consensu.org/v3/vendor-list.json running the following code snippet in import gvlJson from './data/vendor-list.json';
import { GVL, VersionOrVendorList } from '@iabtechlabtcf/core';
const vendorListJson: VersionOrVendorList = gvlJson as unknown as VersionOrVendorList;
export const loadGVL = () => {
const gvl = new GVL(vendorListJson);
console.log(gvl.gvlSpecificationVersion);
console.log(gvl.vendors[755]);
} got the following output in the terminal 3
{
id: 755,
name: 'Google Advertising Products',
purposes: [ 1, 3, 4 ],
legIntPurposes: [ 2, 7, 9, 10 ],
flexiblePurposes: [ 2, 7, 9, 10 ],
specialPurposes: [ 1, 2 ],
features: [ 1, 2 ],
specialFeatures: [],
cookieMaxAgeSeconds: 34190000,
usesCookies: true,
cookieRefresh: false,
usesNonCookieAccess: true,
dataRetention: {
stdRetention: 548,
purposes: { '3': 180, '4': 180 },
specialPurposes: { '1': 1096 }
},
urls: [
{
langId: 'en',
privacy: 'https://business.safety.google/privacy/',
legIntClaim: 'https://policies.google.com/privacy#europeanrequirements'
},
{
langId: 'bg',
privacy: 'https://business.safety.google/intl/bg/privacy/',
legIntClaim: 'https://policies.google.com/privacy?hl=bg#europeanrequirements'
},
{
langId: 'cs',
privacy: 'https://business.safety.google/intl/cs/privacy/',
legIntClaim: 'https://policies.google.com/privacy?hl=cs#europeanrequirements'
},
{
langId: 'da',
privacy: 'https://business.safety.google/intl/da/privacy/',
legIntClaim: 'https://policies.google.com/privacy?hl=da#europeanrequirements'
},
{
langId: 'de',
privacy: 'https://business.safety.google/intl/de/privacy/',
legIntClaim: 'https://policies.google.com/privacy?hl=de#europeanrequirements'
},
{
langId: 'el',
privacy: 'https://business.safety.google/intl/el/privacy/',
legIntClaim: 'https://policies.google.com/privacy?hl=el#europeanrequirements'
},
{
langId: 'es',
privacy: 'https://business.safety.google/intl/es/privacy/',
legIntClaim: 'https://policies.google.com/privacy?hl=es#europeanrequirements'
},
{
langId: 'et',
privacy: 'https://business.safety.google/intl/et/privacy/',
legIntClaim: 'https://policies.google.com/privacy?hl=et#europeanrequirements'
},
{
langId: 'fi',
privacy: 'https://business.safety.google/intl/fi/privacy/',
legIntClaim: 'https://policies.google.com/privacy?hl=fi#europeanrequirements'
},
{
langId: 'fr',
privacy: 'https://business.safety.google/intl/fr/privacy/',
legIntClaim: 'https://policies.google.com/privacy?hl=fr#europeanrequirements'
},
{
langId: 'hr',
privacy: 'https://business.safety.google/intl/hr/privacy/',
legIntClaim: 'https://policies.google.com/privacy?hl=hr#europeanrequirements'
},
{
langId: 'hu',
privacy: 'https://business.safety.google/intl/hu/privacy/',
legIntClaim: 'https://policies.google.com/privacy?hl=hu#europeanrequirements'
},
{
langId: 'it',
privacy: 'https://business.safety.google/intl/it/privacy/',
legIntClaim: 'https://policies.google.com/privacy?hl=it#europeanrequirements'
},
{
langId: 'lt',
privacy: 'https://business.safety.google/intl/lt/privacy/',
legIntClaim: 'https://policies.google.com/privacy?hl=lt#europeanrequirements'
},
{
langId: 'lv',
privacy: 'https://business.safety.google/intl/lv/privacy/',
legIntClaim: 'https://policies.google.com/privacy?hl=lv#europeanrequirements'
},
{
langId: 'nl',
privacy: 'https://business.safety.google/intl/nl/privacy/',
legIntClaim: 'https://policies.google.com/privacy?hl=nl#europeanrequirements'
},
{
langId: 'no',
privacy: 'https://business.safety.google/intl/no/privacy/',
legIntClaim: 'https://policies.google.com/privacy?hl=no#europeanrequirements'
},
{
langId: 'pl',
privacy: 'https://business.safety.google/intl/pl/privacy/',
legIntClaim: 'https://policies.google.com/privacy?hl=pl#europeanrequirements'
},
{
langId: 'pt',
privacy: 'https://business.safety.google/intl/pt-PT/privacy/',
legIntClaim: 'https://policies.google.com/privacy?hl=pt-PT#europeanrequirements'
},
{
langId: 'ro',
privacy: 'https://business.safety.google/intl/ro/privacy/',
legIntClaim: 'https://policies.google.com/privacy?hl=ro#europeanrequirements'
},
{
langId: 'sk',
privacy: 'https://business.safety.google/intl/sk/privacy/',
legIntClaim: 'https://policies.google.com/privacy?hl=sk#europeanrequirements'
},
{
langId: 'sl',
privacy: 'https://business.safety.google/intl/sl/privacy/',
legIntClaim: 'https://policies.google.com/privacy?hl=sl#europeanrequirements'
},
{
langId: 'sv',
privacy: 'https://business.safety.google/intl/sv/privacy/',
legIntClaim: 'https://policies.google.com/privacy?hl=sv#europeanrequirements'
}
],
dataDeclaration: [
1, 2, 3, 5, 6,
7, 8, 10, 11
],
deviceStorageDisclosureUrl: 'https://www.gstatic.com/iabtcf/deviceStorageDisclosure.json'
}
done could you please confirm that you have still have a problem. |
Yes..please help mi...thanks |
@adafee15 could you please test my code snippet with lates GVL v24 and send me error message that you are getting, thanks
|
Thank you for your reply. We are actually ended up using very similar code as you posted above ( However, we would rather not cast gvlJson as unknown to do a double assertion as that is not a best practice. The underlying issue is that the Vendor Model is incorrect (legIntClaim needs to be optional under urls, and there may be another issue or two as well). Would it be possible to fix the inconsistencies between the vendor list and the Model so that we don't need to do a double assertion and can ensure type safety? |
ok, makes sense, I agree, we need to improve the vendor model |
Thank you! |
Version
sdk version: 1.5.10
vendorlist version: 21
Module (core, cmpapi, cli, stub, or testing)
core
Describe with reproduction steps – What is the expected behavior?
I am not able to load the vendor list json using the code snippet below.
I get an error because vendor 4 does not have "legIntClaim".
Here is what vendor 4 in version 21 vendorlist:
"4":{"id":4,"name":"Roq.ad GmbH","purposes":[1,2,3,4,7,9,10],"legIntPurposes":[],"flexiblePurposes":[],"specialPurposes":[],"features":[1,2,3],"specialFeatures":[1],"cookieMaxAgeSeconds":31536000,"usesCookies":true,"cookieRefresh":true,"usesNonCookieAccess":false,"dataRetention":{"stdRetention":365,"purposes":{},"specialPurposes":{}},"urls":[{"langId":"en","privacy":"https://www.roq.ad/privacy-policy-roqad/"}],"dataDeclaration":[1,2,3,4,5,6,8,9,11],"deviceStorageDisclosureUrl":"https://roqad-public.s3.eu-central-1.amazonaws.com/tcf-disclosure.json"}
When I manually fix this particular issue, I encounter further incompatibility errors.
The text was updated successfully, but these errors were encountered: