Skip to content

add known purpose enum #153

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": "12.8.1",
"version": "12.9.0",
"homepage": "https://github.com/transcend-io/airgap.js-types",
"repository": {
"type": "git",
Expand Down
13 changes: 13 additions & 0 deletions src/enums/purpose.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,19 @@ export const ConfigurablePurpose = makeEnum({
export type ConfigurablePurpose =
typeof ConfigurablePurpose[keyof typeof ConfigurablePurpose];

/**
* Purposes that can be configured
*/
export const KnownDefaultPurpose = makeEnum({
/** The request is necessary for the essential features of the website */
Essential: 'Essential',
...ConfigurablePurpose,
});

/** Type override */
export type KnownDefaultPurpose =
typeof KnownDefaultPurpose[keyof typeof KnownDefaultPurpose];

/**
* Purposes used by the purpose map
*/
Expand Down
Loading