// ═══════════════════════════════════════════════════════════
// Approval Types — from CONTRACTS.md §1.4
// ═══════════════════════════════════════════════════════════

import type { PipelineStage } from "./pipeline.js";

export type ApprovalType = "stage_gate" | "deploy" | "code_review" | "manual_check";
export type ApprovalStatus = "pending" | "approved" | "rejected" | "expired";

export interface Approval {
  id: string;
  taskId: string;
  pipelineId: string;
  stageName: PipelineStage;
  type: ApprovalType;
  status: ApprovalStatus;
  approvedBy: string | null;
  approvedAt: string | null;
  rejectionReason: string | null;
  conditions: string[];
  requiredApprovers: number;
  currentApprovers: number;
  createdAt: string;
}
