import http from '@/api'
import { OssQuery, OssVO } from '@/api/interface/system/oss'
/**
 * @name 查询OSS对象存储列表
 * @param query 参数
 * @returns 返回列表
 */
export const listOssApi = (query: OssQuery) => {
  return http.get<OssVO[]>('/resource/oss/list', query, { loading: true })
}

/**
 * @name 查询OSS对象基于id串
 * @param ossId ossId
 * @returns returns
 */
export const getListByIdsApi = (ossIds: string | number) => {
  return http.get<OssVO[]>(`/resource/oss/listByIds/${ossIds}`)
}

/**
 * @name 删除OSS对象存储
 * @param ossId ossId
 * @returns returns
 */
export const delOssApi = (ossId: string | number | Array<string | number>) => {
  return http.delete<any>(`/resource/oss/${ossId}`)
}
