// @ts-ignore
/* eslint-disable */

// 该文件自动生成，请勿手动修改！

// --------------------------------------------------------------------------
// 角色组
// --------------------------------------------------------------------------

import { request } from '@umijs/max';

/** 添加角色组 POST /api/sys/role/group/add */
export async function add(data: API.AddSysRoleGroupInput, options?: { [key: string]: any }) {
    const url = '/api/sys/role/group/add';
    const config = { method: 'POST', data, ...(options || {}) };
    const res = await request<API.ResponseType<number>>(url, config);
    return res?.data;
}

/** 修改角色组 POST /api/sys/role/group/update */
export async function update(data: API.UpdateSysRoleGroupInput, options?: { [key: string]: any }) {
    const url = '/api/sys/role/group/update';
    const config = { method: 'POST', data, ...(options || {}) };
    const res = await request<API.ResponseType<any>>(url, config);
    return res?.data;
}

/** 删除角色组 POST /api/sys/role/group/del */
export async function del(data: API.DeleteSysRoleGroupInput, options?: { [key: string]: any }) {
    const url = '/api/sys/role/group/del';
    const config = { method: 'POST', data, ...(options || {}) };
    const res = await request<API.ResponseType<any>>(url, config);
    return res?.data;
}

/** 获取所有角色组 GET /api/sys/role/group/get-all-list */
export async function getAllList(options?: { [key: string]: any }) {
    const url = '/api/sys/role/group/get-all-list';
    const config = { method: 'GET', ...(options || {}) };
    const res = await request<API.ResponseType<API.SysRoleGroupOutput[]>>(url, config);
    return res?.data;
}

export default {
    /** 添加角色组 POST /api/sys/role/group/add */
    add,
    /** 修改角色组 POST /api/sys/role/group/update */
    update,
    /** 删除角色组 POST /api/sys/role/group/del */
    del,
    /** 获取所有角色组 GET /api/sys/role/group/get-all-list */
    getAllList,
};
