@nevis-security/nevis-mobile-authentication-sdk-react
Version:
React Native plugin for Nevis Mobile Authentication SDK. Supports only mobile.
50 lines (49 loc) • 3.69 kB
JavaScript
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.DeviceInformationChangeErrorConverter = void 0;
var _DeviceInformationChangeClockSkewTooBigError = require("./DeviceInformationChangeClockSkewTooBigError");
var _DeviceInformationChangeDeviceProtectionError = require("./DeviceInformationChangeDeviceProtectionError");
var _DeviceInformationChangeNameAlreadyExists = require("./DeviceInformationChangeNameAlreadyExists");
var _DeviceInformationChangeNetworkError = require("./DeviceInformationChangeNetworkError");
var _DeviceInformationChangeNoDeviceLockError = require("./DeviceInformationChangeNoDeviceLockError");
var _DeviceInformationChangeNotFound = require("./DeviceInformationChangeNotFound");
var _DeviceInformationChangeUnknownError = require("./DeviceInformationChangeUnknownError");
var _ErrorConverter = require("../../ErrorConverter");
/**
* Copyright © 2023-2024 Nevis Security AG. All rights reserved.
*/
var DeviceInformationChangeErrorType = /*#__PURE__*/function (DeviceInformationChangeErrorType) {
DeviceInformationChangeErrorType[DeviceInformationChangeErrorType["ClockSkewTooBig"] = 0] = "ClockSkewTooBig";
DeviceInformationChangeErrorType[DeviceInformationChangeErrorType["DeviceProtectionError"] = 1] = "DeviceProtectionError";
DeviceInformationChangeErrorType[DeviceInformationChangeErrorType["NameAlreadyExists"] = 2] = "NameAlreadyExists";
DeviceInformationChangeErrorType[DeviceInformationChangeErrorType["NetworkError"] = 3] = "NetworkError";
DeviceInformationChangeErrorType[DeviceInformationChangeErrorType["NoDeviceLockError"] = 4] = "NoDeviceLockError";
DeviceInformationChangeErrorType[DeviceInformationChangeErrorType["NotFound"] = 5] = "NotFound";
DeviceInformationChangeErrorType[DeviceInformationChangeErrorType["Unknown"] = 6] = "Unknown";
return DeviceInformationChangeErrorType;
}(DeviceInformationChangeErrorType || {});
class DeviceInformationChangeErrorConverter extends _ErrorConverter.ErrorConverter {
convert() {
const subtype = DeviceInformationChangeErrorType[this.error.type];
switch (subtype) {
case DeviceInformationChangeErrorType.ClockSkewTooBig:
return new _DeviceInformationChangeClockSkewTooBigError.DeviceInformationChangeClockSkewTooBigError(this.error.description, this.error.cause);
case DeviceInformationChangeErrorType.DeviceProtectionError:
return new _DeviceInformationChangeDeviceProtectionError.DeviceInformationChangeDeviceProtectionError(this.error.description, this.error.cause);
case DeviceInformationChangeErrorType.NameAlreadyExists:
return new _DeviceInformationChangeNameAlreadyExists.DeviceInformationChangeNameAlreadyExists(this.error.description, this.error.cause);
case DeviceInformationChangeErrorType.NetworkError:
return new _DeviceInformationChangeNetworkError.DeviceInformationChangeNetworkError(this.error.description, this.error.cause);
case DeviceInformationChangeErrorType.NoDeviceLockError:
return new _DeviceInformationChangeNoDeviceLockError.DeviceInformationChangeNoDeviceLockError(this.error.description, this.error.cause);
case DeviceInformationChangeErrorType.NotFound:
return new _DeviceInformationChangeNotFound.DeviceInformationChangeNotFound(this.error.description, this.error.cause);
case DeviceInformationChangeErrorType.Unknown:
return new _DeviceInformationChangeUnknownError.DeviceInformationChangeUnknownError(this.error.description, this.error.cause);
}
}
}
exports.DeviceInformationChangeErrorConverter = DeviceInformationChangeErrorConverter;
//# sourceMappingURL=DeviceInformationChangeErrorConverter.js.map
;