diff --git a/src/Contacts.ts b/src/Contacts.ts index aa4d81061..8c89980e5 100644 --- a/src/Contacts.ts +++ b/src/Contacts.ts @@ -10,6 +10,9 @@ export type ConsentState = 'allowed' | 'denied' | 'unknown' export type ConsentListEntryType = 'address' +export type PrivatePreferencesAction = + privatePreferences.PrivatePreferencesAction + export class ConsentListEntry { value: string entryType: ConsentListEntryType @@ -112,7 +115,7 @@ export class ConsentList { ) ) : result - }, [] as privatePreferences.PrivatePreferencesAction[]) + }, [] as PrivatePreferencesAction[]) // update consent list entries actions.forEach((action) => { @@ -136,7 +139,7 @@ export class ConsentList { const actions = entries.reduce((result, entry) => { // only handle address entries for now if (entry.entryType === 'address') { - const action: privatePreferences.PrivatePreferencesAction = { + const action: PrivatePreferencesAction = { allow: entry.permissionType === 'allowed' ? { diff --git a/src/index.ts b/src/index.ts index ea41bc356..f0a75608c 100644 --- a/src/index.ts +++ b/src/index.ts @@ -112,5 +112,9 @@ export type { GetMessageContentTypeFromClient, ExtractDecodedType, } from './types/client' -export type { ConsentState, ConsentListEntryType } from './Contacts' +export type { + ConsentState, + ConsentListEntryType, + PrivatePreferencesAction, +} from './Contacts' export { ConsentListEntry } from './Contacts'