Skip to content

Commit

Permalink
Add non TCF vendor config (#118)
Browse files Browse the repository at this point in the history
* Add non TCF vendor config

* Bump
  • Loading branch information
anotherminh authored Dec 1, 2023
1 parent 6396d2b commit abf1bea
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 1 deletion.
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),
}),
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

0 comments on commit abf1bea

Please sign in to comment.