@nevis-security/nevis-mobile-authentication-sdk-react
Version:
React Native plugin for Nevis Mobile Authentication SDK. Supports only mobile.
41 lines (37 loc) • 1.26 kB
JavaScript
/**
* Copyright © 2024 Nevis Security AG. All rights reserved.
*/
import { DeviceInformationSyncErrorConverter } from '../../error/deviceInformation/sync/DeviceInformationSyncErrorConverter';
/**
* This is the result of the {@link DeviceInformationSync} operation.
*
* @see {@link DeviceInformationSync}
*/
export class DeviceInformationSyncResult {
/**
* Returns the errors that occurred retrieving the configuration mismatches.
*
* @return the errors that occurred retrieving the configuration mismatches.
*/
/**
* Alternate constructor that creates a {@link DeviceInformationSyncResult} from a json.
*
* @returns the created {@link DeviceInformationSyncResult} instance.
*/
static fromJson(json) {
return DeviceInformationSyncResultImpl.fromJson(json);
}
}
export class DeviceInformationSyncResultImpl extends DeviceInformationSyncResult {
constructor(errors) {
super();
this.errors = errors;
}
static fromJson(json) {
const errorsData = json.errors;
const errors = errorsData?.map(error => new DeviceInformationSyncErrorConverter(error).convert());
return new DeviceInformationSyncResultImpl(errors || []);
}
}
//# sourceMappingURL=DeviceInformationSyncResult.js.map
;