/** * @description 获取租户下所有数据源 */ import { getUrl } from 'src/utils/getUrl'; import Request from 'src/utils/requests'; import * as defs from '../../baseClass'; export class Params { /** useType */ useType: | 'COMPUTE_ENGINE' | 'PHYSICAL' | 'META_COMPUTE_ENGINE' | 'META_PHYSICAL'; } export const init = []; export async function request(params = {}) { return Request({ url: '/api/dsConfig/allList', params, method: 'get', }); } export function createFetchAction(types, stateKey) { return (params = {}, meta?: any) => { return { types, meta, stateKey, method: 'GET', url: getUrl('/api/dsConfig/allList', params, 'GET'), params, init, }; }; }