import httpRequest from '@/utils/axios'
import type { CreateDatasetParams } from './types'

// 创建内置数据集
export function createDataset(data: CreateDatasetParams) {
  return httpRequest.post('/api/resource/bi/v1/data/built-in/create', data)
}

// 删除内置数据集
export function deleteDataset(data: { id: string }) {
  return httpRequest.post('/api/resource/bi/v1/data/built-in/delete', data)
}

// 内置数据集列表
export function getDatasetList(
  params?: Partial<{
    name: string
    industry: string
    source: string
    sensitivity_level: string
    access_permissions: string
    page: number
    'per-page': number
  }>
) {
  return httpRequest.get('/api/resource/bi/v1/data/built-in/list', { params })
}
