Skip to content

Commit

Permalink
fix: export PrivatePreferencesAction type
Browse files Browse the repository at this point in the history
  • Loading branch information
rygine committed Nov 13, 2023
1 parent 8fde688 commit 1f9ce8e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
7 changes: 5 additions & 2 deletions src/Contacts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -112,7 +115,7 @@ export class ConsentList {
)
)
: result
}, [] as privatePreferences.PrivatePreferencesAction[])
}, [] as PrivatePreferencesAction[])

// update consent list entries
actions.forEach((action) => {
Expand All @@ -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'
? {
Expand Down
6 changes: 5 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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'

0 comments on commit 1f9ce8e

Please sign in to comment.