import { apiRequestData } from "./http"; import type { RiskFlag } from "./feeControl"; export type ApOperationsSummary = { summary: { openPaymentBatchCount: number; failedPaymentBatchItemCount: number; openRiskFlagCount: number; reconciliationAnomalyCount: number; }; openPaymentBatches: Array<{ id: string; batchNo: string; entityType: string; name: string; status: string; createdAt: string | null }>; failedPaymentBatchItems: Array<{ id: string; paymentBatchId: string; entityId: string; entityCode: string; entityTitle: string; amount: string; currencyCode: string; failureCode: string | null; failureMessage: string | null; createdAt: string | null }>; openRiskFlags: RiskFlag[]; reconciliationAnomalies: Array<{ id: string; travelReconciliationBatchId: string; travelOrderId: string | null; travelRequestId: string | null; matchStatus: string; resolutionStatus: string; anomalyCode: string | null; orderAmount: string | null; transactionAmount: string | null; currency: string; createdAt: string | null }>; }; export async function fetchApOperations() { return apiRequestData("/api/ap-operations"); }