import type { AxiosResponse } from 'axios'
import type { Result } from '@cacp/ui'

import request from '@/utils/request'
import type { JSONObject } from '@antv/x6'

const contextPath = '/baseCode'

// 获取基础数据列表
export async function getBaseCodeList(code: string): Promise<Result<Array<JSONObject>>> {
  const res: AxiosResponse<Result<Array<JSONObject>>> = await request.get(`${contextPath}/appBase?code=${code}`)
  return res.data
}
