/**
 * Approval API Models
 * Models for request approval management
 */

export type ApprovalStatus = 'PENDING' | 'APPROVED' | 'REJECTED' | 'CHANGES_REQUESTED' | 'REVIEW_REQUIRED';
export type RejectionReason =
  | 'DOCUMENTATION_INCOMPLETE'
  | 'INCOMPLETE_DOCUMENTS'
  | 'ELIGIBILITY_CRITERIA_NOT_MET'
  | 'INCOMPLETE_INFORMATION'
  | 'POLICY_VIOLATION'
  | 'FRAUD_SUSPECTED'
  | 'OTHER';

export interface ApprovalResponseDto {
  id: string;
  requestId: string;
  departmentId: string;
  departmentName: string;
  departmentCode?: string;
  status: ApprovalStatus;
  approvedBy?: string;
  remarks?: string;
  reviewedDocuments: string[];
  rejectionReason?: RejectionReason;
  requiredDocuments?: string[];
  invalidatedAt?: string;
  invalidationReason?: string;
  revalidatedAt?: string;
  createdAt: string;
  updatedAt: string;
  completedAt?: string;
}

export interface RevalidateDto {
  remarks: string;
  revalidatedBy?: string;
  reviewedDocuments?: string[];
}

export interface PaginatedApprovalsResponse {
  data: ApprovalResponseDto[];
  total: number;
  page: number;
  limit: number;
  totalPages: number;
  hasNextPage: boolean;
}
