import { User } from '../domain/User';

export interface Permission {
  id: string;
  name: string;
  resource: string;
  action: string;
}

export interface Role {
  id: string;
  name: string;
  permissions: Permission[];
  description?: string;
}

export interface AuthToken {
  accessToken: string;
  refreshToken?: string;
  expiresAt: Date;
}

export interface UserCredentials {
  username: string;
  password: string;
}

export interface LoginResponse {
  user: User;
  token: AuthToken;
}

export interface SecurityConfig {
  id: string;
  tenantId: string;
  name: string;
  type: 'FIREWALL' | 'ENCRYPTION' | 'ACCESS_CONTROL' | 'AUDIT' | 'NETWORK';
  enabled: boolean;
  settings: Record<string, any>;
  createdAt: Date;
  updatedAt: Date;
}

export interface SecurityStatus {
  status: 'ACTIVE' | 'INACTIVE' | 'ERROR';
  lastUpdated: Date;
  complianceLevel: 'COMPLIANT' | 'NON_COMPLIANT' | 'PENDING';
}

export interface ComplianceCheck {
  id: string;
  tenantId: string;
  name: string;
  type: 'SECURITY' | 'PRIVACY' | 'DATA_PROTECTION' | 'ACCESS_CONTROL';
  enabled: boolean;
  schedule: string;
  lastRun?: Date;
  nextRun?: Date;
}

export interface ComplianceResult {
  checkId: string;
  target: string;
  status: 'PASSED' | 'FAILED' | 'ERROR' | 'PENDING';
  message: string;
  timestamp: Date;
  details?: Record<string, any>;
}
