react-native-efilli-sdk
Version:
Efilli SDK for React Native - Consent Management Solution
33 lines (32 loc) • 1.03 kB
JavaScript
// src/enums/ConsentAction.tsx
Object.defineProperty(exports, "__esModule", { value: true });
exports.fromConsentActionValue = exports.ConsentAction = void 0;
/**
* Enumeration of possible consent actions that can be taken by the user
*/
var ConsentAction;
(function (ConsentAction) {
/**
* Save the current selection of consent options
*/
ConsentAction["SAVE"] = "save";
/**
* Indicates the saved consent is being returned
*/
ConsentAction["SAVED_CONSENT"] = "saved-consent";
/**
* Reject all optional consent categories
*/
ConsentAction["REJECT_ALL"] = "reject-all";
/**
* Accept all consent categories
*/
ConsentAction["ACCEPT_ALL"] = "accept-all";
})(ConsentAction || (exports.ConsentAction = ConsentAction = {}));
// Add the static method
const fromConsentActionValue = (value) => {
const values = Object.values(ConsentAction);
return values.includes(value) ? value : null;
};
exports.fromConsentActionValue = fromConsentActionValue;
;