-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: update all consent entries to be returned
- Loading branch information
1 parent
ed1d791
commit c25bd23
Showing
6 changed files
with
52 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
export type ConsentState = 'allowed' | 'denied' | 'unknown' | ||
|
||
export type ConsentListEntryType = 'address' | ||
|
||
export class ConsentListEntry { | ||
value: string | ||
entryType: ConsentListEntryType | ||
permissionType: ConsentState | ||
|
||
constructor( | ||
value: string, | ||
entryType: ConsentListEntryType, | ||
permissionType: ConsentState | ||
) { | ||
this.value = value | ||
this.entryType = entryType | ||
this.permissionType = permissionType | ||
} | ||
|
||
static from(json: string): ConsentListEntry { | ||
const entry = JSON.parse(json) | ||
return new ConsentListEntry(entry.value, entry.type, entry.state) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters