Skip to content

Commit

Permalink
Merge pull request #492 from xmtp/rygine/export-pppp-type
Browse files Browse the repository at this point in the history
Add export for `PrivatePreferencesAction` type
  • Loading branch information
rygine authored Nov 13, 2023
2 parents 6bceb1c + 48558bc commit 287bc7b
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 @@ -12,6 +12,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 @@ -91,7 +94,7 @@ export class ConsentList {
)
)
: result
}, [] as privatePreferences.PrivatePreferencesAction[])
}, [] as PrivatePreferencesAction[])

return actions
}
Expand Down Expand Up @@ -174,7 +177,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 287bc7b

Please sign in to comment.