@dodgeball/trust-sdk-server
Version:
74 lines (73 loc) • 3.86 kB
JavaScript
;
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.DodgeballMissingParameterError = exports.DodgeballInvalidConfigError = exports.DodgeballMissingConfigError = exports.VerificationOutcome = exports.VerificationStatus = exports.DodgeballApiVersion = void 0;
var DodgeballApiVersion;
(function (DodgeballApiVersion) {
DodgeballApiVersion["v1"] = "v1";
})(DodgeballApiVersion = exports.DodgeballApiVersion || (exports.DodgeballApiVersion = {}));
var VerificationStatus;
(function (VerificationStatus) {
// In Process on the server
VerificationStatus["PENDING"] = "PENDING";
// Waiting on some action, for example MFA
VerificationStatus["BLOCKED"] = "BLOCKED";
// Workflow evaluated successfully
VerificationStatus["COMPLETE"] = "COMPLETE";
// Workflow execution failure
VerificationStatus["FAILED"] = "FAILED";
})(VerificationStatus = exports.VerificationStatus || (exports.VerificationStatus = {}));
var VerificationOutcome;
(function (VerificationOutcome) {
VerificationOutcome["APPROVED"] = "APPROVED";
VerificationOutcome["DENIED"] = "DENIED";
VerificationOutcome["PENDING"] = "PENDING";
VerificationOutcome["ERROR"] = "ERROR";
})(VerificationOutcome = exports.VerificationOutcome || (exports.VerificationOutcome = {}));
var DodgeballMissingConfigError = /** @class */ (function (_super) {
__extends(DodgeballMissingConfigError, _super);
function DodgeballMissingConfigError(configName, value) {
var _newTarget = this.constructor;
var _this = _super.call(this, "Dodgeball SDK Error\nMissing configuration: " + configName + "\nProvided Value: " + value) || this;
Object.setPrototypeOf(_this, _newTarget.prototype);
return _this;
}
return DodgeballMissingConfigError;
}(Error));
exports.DodgeballMissingConfigError = DodgeballMissingConfigError;
var DodgeballInvalidConfigError = /** @class */ (function (_super) {
__extends(DodgeballInvalidConfigError, _super);
function DodgeballInvalidConfigError(configName, value, allowedValues) {
var _newTarget = this.constructor;
var _this = _super.call(this, "Dodgeball SDK Error\nInvalid configuration: " + configName + "\nProvided value: " + value + "\nAllowed values: " + allowedValues.join(", ")) || this;
Object.setPrototypeOf(_this, _newTarget.prototype);
return _this;
}
return DodgeballInvalidConfigError;
}(Error));
exports.DodgeballInvalidConfigError = DodgeballInvalidConfigError;
var DodgeballMissingParameterError = /** @class */ (function (_super) {
__extends(DodgeballMissingParameterError, _super);
function DodgeballMissingParameterError(parameter, value) {
var _newTarget = this.constructor;
var _this = _super.call(this, "Dodgeball SDK Error\nMissing parameter: " + parameter + "\nProvided value: " + value) || this;
Object.setPrototypeOf(_this, _newTarget.prototype);
return _this;
}
return DodgeballMissingParameterError;
}(Error));
exports.DodgeballMissingParameterError = DodgeballMissingParameterError;