import request from '../../utils/request'; import { Result, ResultList, _Pager_Params } from '../../services'; export interface ButtonFields { searchValue: string; createBy: string; createTime: string; updateBy: string; updateTime: string; remark: string; params: Record; buttonId: string; menuName: string; menuPath: string; buttonName: string; perms: string; status: string; prefix: boolean; } interface GetListProps extends _Pager_Params, ButtonFields {} export const getListApi = async (params?: Partial) => { return request>({ url: '/button/list', method: 'get', params, }); }; export const delApi = async (deleteKeys: ButtonFields['buttonId'][]) => { const deleteKeysString = deleteKeys.join(','); return await request({ url: `/button/delete/${deleteKeysString || ''}`, method: 'get', }); }; export const updateApi = async (data: Partial) => { return await request({ url: '/button/edit', method: 'post', data, }); }; export const addApi = async (data: Partial>) => { return await request({ url: '/button', method: 'post', data, }); };