export enum Stage {
  'DEV',
  'BETA',
  'PROD',
}

export enum Filter {
  'LINE_DRAWING',
  'NATURAL',
}

export enum Time {
  'THREE_HOURS',
  'THIRTY_DAYS',
  'THIRTY_MIN',
}

export enum Error {
  'TokenException',
  'CameraPermission',
  'NetworkException',
  'ServerException',
  'UnsupportedDevice',
  'CertificateException',
  'UnknownException',
  'CameraException',
  'MultiWindowUnsupportedException',
  'CaptureAlreadyActiveException',
  'FaceDetectorException',
  'UnexpectedErrorException',
  'InvalidOptionsException',
  'ImageNotFoundException',
  'TooManyRequestsException',
  'UserTimeoutException',
}

export interface FaceLivenessResult {
  signedResponse: string;
}

export interface FaceLivenessError {
  message: string;
  type: Error;
}

export interface FaceLivenessFailure {
  message: string;
  type: string;
}

export interface FaceLivenessResponse {
  result: FaceLivenessResult | null;
  error: FaceLivenessError | null;
  failure: FaceLivenessFailure | null;
  cancelled: boolean;
  isLoading: boolean;
}

export interface FaceLivenessSettings {
  cafStage?: Stage;
  filter?: Filter;
  imageUrlExpirationTime?: Time;
  enableScreenshots?: boolean;
  loadingScreen?: boolean;
  faceLivenessBaseUrl?: string;
  authenticationBaseUrl?: string;
  certificates?: string[];
}
