diff --git a/package.json b/package.json index ebbe5bb..f7035f1 100644 --- a/package.json +++ b/package.json @@ -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.7.7", + "version": "10.8.0", "homepage": "https://github.com/transcend-io/airgap.js-types", "repository": { "type": "git", diff --git a/src/ui.ts b/src/ui.ts index 4b611e7..ed0405d 100644 --- a/src/ui.ts +++ b/src/ui.ts @@ -2,7 +2,11 @@ import * as t from 'io-ts'; // main -import { applyEnum, valuesOf } from '@transcend-io/type-utils'; +import { + applyEnum, + FixedLengthArray, + valuesOf, +} from '@transcend-io/type-utils'; import { ConsentManagerLanguageKey } from '@transcend-io/internationalization'; // local @@ -221,6 +225,13 @@ export const TCFConfig = t.type({ css: t.string, /** Path to localizations directory */ messages: t.string, + /** Mapping of tcf purposes to airgap purposes */ + purposeMap: t.record( + /** The TCF purpose number */ + t.number, + /** List of corresponding airgap purposes */ + t.array(t.string), + ), }); /** Type override */