/** * @description check节点的权限信息 * @throws Exception code * @p1-test * DS_NOT_FOUND: 数据源找不到* RESOURCE_NOT_BELONG_TO_CURRENT_TENANT: 跨租户引用数据源 */ import { getUrl } from 'src/utils/getUrl'; import Request from 'src/utils/requests'; import * as defs from '../../baseClass'; export class Params { /** projectId */ projectId: number; /** 文件id */ fileId: string; } export const init = new defs.AuthBaseBO(); export async function request(params = {}, bodyParams = {}) { return Request({ url: '/api/smc/project/{projectId}/nodes/{fileId}/auth', params: bodyParams, method: 'post', }); } export function createFetchAction(types, stateKey) { return (params = {}, bodyParams, meta?: any) => { return { types, meta, stateKey, method: 'POST', url: getUrl( '/api/smc/project/{projectId}/nodes/{fileId}/auth', params, 'POST', ), params: bodyParams, init, }; }; }