Skip to content

Commit

Permalink
add enum for behavior on consent expiry (#120)
Browse files Browse the repository at this point in the history
  • Loading branch information
csmccarthy authored Dec 4, 2023
1 parent 648505f commit 16fe222
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 1 deletion.
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": "10.9.5",
"version": "10.9.6",
"homepage": "https://github.com/transcend-io/airgap.js-types",
"repository": {
"type": "git",
Expand Down
16 changes: 16 additions & 0 deletions src/enums/consentExpiry.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import { makeEnum } from '@transcend-io/type-utils';

/**
* Enum of options available for behavior to exhibit when the user's consent has expired
*/
export const OnConsentExpiry = makeEnum({
/** Reprompts the user to change or confirm their selection */
Prompt: 'prompt',
/** Resets the user's consent and reprompts them */
Reset: 'reset',
/** Resets the user's opted-in purposes and reprompts them */
ResetOptIns: 'reset-opt-ins',
});
/** Override type */
export type OnConsentExpiry =
typeof OnConsentExpiry[keyof typeof OnConsentExpiry];
1 change: 1 addition & 0 deletions src/enums/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ export * from './privacyRegime';
export * from './viewState';
export * from './browserLanguage';
export * from './experience';
export * from './consentExpiry';

0 comments on commit 16fe222

Please sign in to comment.