export type AdminReconcileJobRow = {
  id: number;
  job_no: string;
  admin_user_id: number | null;
  reconcile_type: string;
  status: string;
  period_start: string | null;
  period_end: string | null;
  summary_json: Record<string, unknown> | null;
  finished_at: string | null;
  created_at: string | null;
};

export type AdminReconcileJobListData = {
  items: AdminReconcileJobRow[];
  meta: {
    current_page: number;
    per_page: number;
    total: number;
    last_page: number;
  };
};

export type AdminReconcileJobCreateResponse = {
  id: number;
  job_no: string;
  status: string;
  summary_json: Record<string, unknown> | null;
  item_count: number;
};

export type AdminReconcileItemRow = {
  id: number;
  side_a_ref: string | null;
  side_b_ref: string | null;
  external_ref_no?: string | null;
  difference_amount: number;
  status: string;
  resolved_at: string | null;
  is_resolved?: boolean;
  current_transfer_status?: string | null;
  transfer_direction?: string | null;
  transfer_fail_reason?: string | null;
  main_site_check?: string | null;
  main_site_check_message?: string | null;
  main_site_external_ref_no?: string | null;
  can_reverse?: boolean;
  can_complete_credit?: boolean;
  can_manually_process?: boolean;
  created_at: string | null;
};

export type AdminReconcileItemsData = {
  job_id: number;
  job_no: string;
  items: AdminReconcileItemRow[];
  meta: {
    current_page: number;
    per_page: number;
    total: number;
    last_page: number;
  };
};
