import httpClient from '@/utils/http';

import {
  ControllerResponse,
  ExamCreateClientScanAnswerSheetBatchRequest,
  ExamCreateClientScanAnswerSheetBatchResponse,
  ExamCreateClientScanAnswerSheetInfoRequest,
  ExamCreateClientScanAnswerSheetInfoResponse,
  ExamDeleteClientScanAnswerSheetBatchRequest,
  ExamDeleteClientScanAnswerSheetInfoRequest,
  ExamIncrClientScanAnswerSheetBatchUploadNumRequest,
  ExamUpdateClientScanAnswerSheetInfoRequest,
  ExamUpdateClientScanAnswerSheetInfoResponse
} from './data-contracts';
export default {
  /**
   * @description 客户端创建扫描答题卡批次，通过学校id、考试科目id、ai模板id创建批次
   */
  scanAnswerSheetBatchCreateCreate: (request: ExamCreateClientScanAnswerSheetBatchRequest) => {
    return httpClient.post<
      ControllerResponse & {
        /** 客户端创建扫描答题卡批次响应体 */
        data?: ExamCreateClientScanAnswerSheetBatchResponse;
      }
    >(`/client/scan-answer-sheet/batch/create`, { params: request });
  },
  /**
   * @description 删除答题卡批次
   */
  scanAnswerSheetBatchDeleteCreate: (request: ExamDeleteClientScanAnswerSheetBatchRequest) => {
    return httpClient.post<
      ControllerResponse & {
        data?: number;
      }
    >(`/client/scan-answer-sheet/batch/delete`, { params: request });
  },
  /**
   * @description 更新答题卡批次已扫描数量
   */
  scanAnswerSheetBatchIncrUploadNumCreate: (
    request: ExamIncrClientScanAnswerSheetBatchUploadNumRequest
  ) => {
    return httpClient.post<
      ControllerResponse & {
        data?: number;
      }
    >(`/client/scan-answer-sheet/batch/incrUploadNum`, { params: request });
  },
  /**
   * @description 创建答题卡批次详情
   */
  scanAnswerSheetInfoCreateCreate: (request: ExamCreateClientScanAnswerSheetInfoRequest) => {
    return httpClient.post<
      ControllerResponse & {
        data?: ExamCreateClientScanAnswerSheetInfoResponse;
      }
    >(`/client/scan-answer-sheet/info/create`, { params: request });
  },
  /**
   * @description 批量删除答题卡批次详情
   */
  scanAnswerSheetInfoDeleteCreate: (request: ExamDeleteClientScanAnswerSheetInfoRequest) => {
    return httpClient.post<
      ControllerResponse & {
        data?: number;
      }
    >(`/client/scan-answer-sheet/info/delete`, { params: request });
  },
  /**
   * @description 更新答题卡批次详情
   */
  scanAnswerSheetInfoUpdateCreate: (request: ExamUpdateClientScanAnswerSheetInfoRequest) => {
    return httpClient.post<
      ControllerResponse & {
        data?: ExamUpdateClientScanAnswerSheetInfoResponse;
      }
    >(`/client/scan-answer-sheet/info/update`, { params: request });
  }
};
