export type RiskFlag = { id: string; entityType: string; entityId: string; riskCode: string; level: "low" | "medium" | "high"; title: string; detail: string | null; source: string; status: "open" | "resolved" | "dismissed"; payloadJson: Record | null; createdAt: string | null; createdBy: string | null; resolvedAt: string | null; resolvedBy: string | null; }; export type PrecheckDecision = "pass" | "warn" | "manual_review" | "block"; export type PrecheckResponse = { entityType: "reimbursement" | "purchase_request" | "travel_request"; entityId: string; decision: PrecheckDecision; matchedBudgetControlRule: { id: string; name: string; controlMode: "warn" | "block" | "manual_review"; } | null; budgetHint: Record | null; warnings: Array<{ code: string; title: string; detail: string }>; blockingReasons: Array<{ code: string; title: string; detail: string }>; riskFlags: Array<{ code: string; level: "low" | "medium" | "high"; title: string; detail: string; willOpenOnSubmit: boolean }>; nextActions: string[]; };