/** * @description 新建业务过程 * @throws Exception code * BIZ_PROCESS_CN_DUPLICATED: 业务过程中文名重复 * BIZ_PROCESS_NAME_DUPLICATED: 业务过程英文名重复 * @p1-test * user: 当前用户在项目中无创建权限 * bizProcessDTO.cn: 业务过程名称和已有的业务过程中文名重名 * bizProcessDTO.name: 业务过程名称和已有的业务过程英文名重名 * @p2-test * BIZ_PROCESS_CN_DUPLICATED: 业务过程和已有业务过程重名 * BIZ_PROCESS_NAME_DUPLICATED: 业务过程和已有业务过程重名 */ import { getUrl } from 'src/utils/getUrl'; import Request from 'src/utils/requests'; import * as defs from '../../baseClass'; export class Params { /** projectId */ projectId?: number; } export const init = undefined; export async function request(params = {}, bodyParams = {}) { return Request({ url: '/api/bizProcess', params: bodyParams, method: 'post', }); } export function createFetchAction(types, stateKey) { return (params = {}, bodyParams, meta?: any) => { return { types, meta, stateKey, method: 'POST', url: getUrl('/api/bizProcess', params, 'POST'), params: bodyParams, init, }; }; }