Skip to content
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

Add non TCF vendor config #118

Merged
merged 3 commits into from
Dec 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"author": "Transcend Inc.",
"name": "@transcend-io/airgap.js-types",
"description": "TypeScript types for airgap.js interoperability with custom consent UIs",
"version": "10.9.3",
"version": "10.9.4",
"homepage": "https://github.com/transcend-io/airgap.js-types",
"repository": {
"type": "git",
Expand Down
18 changes: 18 additions & 0 deletions src/iab.ts
Original file line number Diff line number Diff line change
Expand Up @@ -212,3 +212,21 @@ export const TcfV3VendorList = t.intersection([
* Type override
*/
export type TcfV3VendorList = t.TypeOf<typeof TcfV3VendorList>;

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),
Copy link
Contributor

@MadDataScience MadDataScience Dec 1, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will this be converted into TCF purposes using the map within the TCF UI?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@MadDataScience yes, they will be converted into TCF purposes at run time!

}),
t.partial({
/** The vendor description */
description: t.string,
}),
]);

/**
* Type override
*/
export type NonTcfVendor = t.TypeOf<typeof NonTcfVendor>;
3 changes: 3 additions & 0 deletions src/ui.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down Expand Up @@ -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 */
Expand Down
Loading