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

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

// --------------------------------------------------------------------------
// 日志
// --------------------------------------------------------------------------

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

/** 清除访问日志 POST /api/sys/log/clear-log-vis */
export async function clearLogVis(options?: { [key: string]: any }) {
    const url = '/api/sys/log/clear-log-vis';
    const config = { method: 'POST', ...(options || {}) };
    const res = await request<API.ResponseType<any>>(url, config);
    return res?.data;
}

/** 分页查询访问日志 POST /api/sys/log/query-log-vis-page-list */
export async function queryLogVisPageList(
    data: API.SysLogVisPageInput,
    options?: { [key: string]: any },
) {
    const url = '/api/sys/log/query-log-vis-page-list';
    const config = { method: 'POST', data, ...(options || {}) };
    const res = await request<API.ResponseType<API.PageResponse<API.SysLogVisOutput>>>(url, config);
    return res?.data;
}

/** 清除异常日志 POST /api/sys/log/clear-log-ex */
export async function clearLogEx(options?: { [key: string]: any }) {
    const url = '/api/sys/log/clear-log-ex';
    const config = { method: 'POST', ...(options || {}) };
    const res = await request<API.ResponseType<any>>(url, config);
    return res?.data;
}

/** 分页查询异常日志 POST /api/sys/log/query-log-ex-page-list */
export async function queryLogExPageList(
    data: API.SysLogExPageInput,
    options?: { [key: string]: any },
) {
    const url = '/api/sys/log/query-log-ex-page-list';
    const config = { method: 'POST', data, ...(options || {}) };
    const res = await request<API.ResponseType<API.PageResponse<API.SysLogExOutput>>>(url, config);
    return res?.data;
}

/** 清除操作日志 POST /api/sys/log/clear-log-op */
export async function clearLogOp(options?: { [key: string]: any }) {
    const url = '/api/sys/log/clear-log-op';
    const config = { method: 'POST', ...(options || {}) };
    const res = await request<API.ResponseType<any>>(url, config);
    return res?.data;
}

/** 分页查询操作日志 POST /api/sys/log/query-log-op-page-list */
export async function queryLogOpPageList(
    data: API.SysLogOpPageInput,
    options?: { [key: string]: any },
) {
    const url = '/api/sys/log/query-log-op-page-list';
    const config = { method: 'POST', data, ...(options || {}) };
    const res = await request<API.ResponseType<API.PageResponse<API.SysLogOpOutput>>>(url, config);
    return res?.data;
}

export default {
    /** 清除访问日志 POST /api/sys/log/clear-log-vis */
    clearLogVis,
    /** 分页查询访问日志 POST /api/sys/log/query-log-vis-page-list */
    queryLogVisPageList,
    /** 清除异常日志 POST /api/sys/log/clear-log-ex */
    clearLogEx,
    /** 分页查询异常日志 POST /api/sys/log/query-log-ex-page-list */
    queryLogExPageList,
    /** 清除操作日志 POST /api/sys/log/clear-log-op */
    clearLogOp,
    /** 分页查询操作日志 POST /api/sys/log/query-log-op-page-list */
    queryLogOpPageList,
};
