import { request } from "@/utils/request";

import {
  ExamParams,
  ExamSubjectParams,
  RequestActionResult,
} from "./types/common";
import {
  ImageCheckListItem,
  ImageCheckFailedListPageResult,
  ImageCheckFailedParams,
} from "./types/imageCheck";

// 图片检查
export const imageCheckList = (
  data: ExamParams
): Promise<ImageCheckListItem[]> =>
  request({
    url: "/api/admin/check/image/list",
    method: "post",
    params: data,
  });

export const imageCheckFailedList = (
  data: ImageCheckFailedParams
): Promise<ImageCheckFailedListPageResult> =>
  request({
    url: "/api/admin/check/image/failed/page",
    method: "post",
    params: data,
  });

export const imageCheckFailedExport = (
  data: ExamSubjectParams
): Promise<Blob> =>
  request({
    url: "/api/admin/check/image/failed/export",
    method: "get",
    params: data,
    download: true,
  });
