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

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

// --------------------------------------------------------------------------
// 字典数据
// --------------------------------------------------------------------------

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

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

/** 通过字典类型ID获取字典列表 GET /api/sys/dict/data/get-list-by-dict-type-id */
export async function getListByDictTypeId(
    params: {
        /**  */
        dicttypeid?: number;
    },
    options?: { [key: string]: any },
) {
    const url = '/api/sys/dict/data/get-list-by-dict-type-id';
    const config = { method: 'GET', params, ...(options || {}) };
    const res = await request<API.ResponseType<API.SysDictDataOutput[]>>(url, config);
    return res?.data;
}

export default {
    /** 获取所有字典列表 GET /api/sys/dict/data/get-all-list */
    getAllList,
    /** 通过字典类型ID获取字典列表 GET /api/sys/dict/data/get-list-by-dict-type-id */
    getListByDictTypeId,
};
