import { defHttp } from '/@/utils/http/axios';
import {
  restoreItemParam,
  allUserListParam,
  cameraListParam,
  GetCameraListAllModel,
} from './model';
import { Result } from '/#/axios';

enum Api {
  restore = '/service/manage_jp/storage/restore',
  allUserList = '/service/manage_jp/user/allUserList',
  cameraList = '/service/manage_jp/camera/getByUser',
  migrate = '/service/manage_jp/scene/move',
}

/**
 * @description: Get sample list value
 */

export const restoreApi = (params: restoreItemParam) =>
  defHttp.post<Result>({
    url: Api.restore,
    params,
    headers: {
      // @ts-ignore
      ignoreCancelToken: true,
    },
  });
export const migrateApi = (params: restoreItemParam) =>
  defHttp.post<Result>({
    url: Api.migrate,
    params,
    headers: {
      // @ts-ignore
      ignoreCancelToken: true,
    },
  });
export const getAllAccountListApi = (params: allUserListParam) =>
  defHttp.post<Result>({
    url: Api.allUserList,
    params,
    headers: {
      // @ts-ignore
      ignoreCancelToken: true,
    },
  });

export const getCameraListApi = (params: cameraListParam) =>
  defHttp.post<GetCameraListAllModel>({
    url: Api.cameraList,
    params,
    headers: {
      // @ts-ignore
      ignoreCancelToken: true,
    },
  });
