Files
TrangleAgent/Frontend/src/api/controller/Room/getApiRoomList.ts
2026-01-18 19:07:41 +08:00

41 lines
1.1 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import request from "../../http.js";
import { type LekeApiRoomV1RoomListRes, type DeepRequired } from "../../interface";
import { type AxiosRequestConfig } from "axios";
/**
* Room List
* /api/room/list
*/
export function getApiRoomList(params: GetApiRoomListParams, config?: AxiosRequestConfig) {
const paramsInput = {
page: params.page,
pageSize: params.pageSize,
total: params.total,
room_code: params.room_code,
room_name: params.room_name,
host_id: params.host_id,
status: params.status,
system_name: params.system_name,
};
return request.get<DeepRequired<LekeApiRoomV1RoomListRes>>(`/api/room/list`, {
params: paramsInput,
...config,
});
}
export interface GetApiRoomListParams {
page?: number;
pageSize?: number;
total?: number;
/** 房间号 */
room_code?: string;
/** 房间名称 */
room_name?: string;
/** 主持人用户ID */
host_id?: number;
/** 房间状态0未开始 1进行中 2已结束 3已关闭 */
status?: number;
/** 规则系统如COC、DND5E */
system_name?: string;
}