import request from '@/utils/request'

export function getDataSourceList(dataSourceQueryReq) {
  return request({
    url: '/data/data/list',
    method: 'post',
    data: dataSourceQueryReq
  })
}

export function getAllDataType() {
  return request({
    url: '/data/dataType/getAllDataType',
    method: 'get'
  })
}

export function insertDataSource(dataSource) {
  return request({
    url: '/data/data/insertDataSource',
    method: 'post',
    data: dataSource
  })
}

export function dataSynchronization(dataSourceResp) {
  return request({
    url: '/data/data/dataSynchronization',
    method: 'post',
    data: dataSourceResp
  })
}

export function testConnect(dataSourceResp) {
  return request({
    url: '/data/data/testConnect',
    method: 'post',
    data: dataSourceResp
  })
}

export function queryStructure(dataSourceResp) {
  return request({
    url: '/data/data/queryStructure',
    method: 'post',
    data: dataSourceResp
  })
}

export function queryBigStructure() {
  return request({
    url: '/data/data/queryBigStructure',
    method: 'post'
  })
}

export function queryTableStructure(tableStructureQueryReq) {
  return request({
    url: '/data/data/queryTableStructure',
    method: 'post',
    data: tableStructureQueryReq
  })
}
