/** * @description 行为中心 - 行为元素 - [新增,编辑]时的重名(displayName)判断 */ import { getUrl } from 'src/utils/getUrl'; import Request from 'src/utils/requests'; import * as defs from '../../baseClass'; export class Params { /** displayName */ displayName: string; /** type */ type: 'DOMAIN' | 'BIZ_LINE' | 'ACTION' | 'OBJECT' | 'OBJECT_PROPERTY'; } export const init = false; export async function request(params = {}) { return Request({ url: '/api/oneid/behaviorElement/{type}/displayNameIsDuplicate', params, method: 'get', }); } export function createFetchAction(types, stateKey) { return (params = {}, meta?: any) => { return { types, meta, stateKey, method: 'GET', url: getUrl( '/api/oneid/behaviorElement/{type}/displayNameIsDuplicate', params, 'GET', ), params, init, }; }; }