import { request } from '@umijs/max';

export async function getStorageDetectionList(params?: API.StorageDetection.ListParams) {
  return request<API.StorageDetection.StoragePageResult>(`/api/cms/storageDetection/getList`, {
    method: 'GET',
    params: params,
  });
}

export async function getStorageDetectionSingle(detectionId: string) {
  return request<API.StorageDetection.StorageIdResult>(
    `/api/cms/storageDetection/getSingle/${detectionId}`,
    {
      method: 'GET',
    },
  );
}

export async function saveStorageDetection(params?: API.StorageDetection.AddParams) {
  return request(`/api/cms/storageDetection/save`, {
    method: 'POST',
    data: params,
  });
}
