Some checks failed
Build and Release / Build (push) Has been cancelled
- 新增家庭共享订阅管理 - 新增用户邀请统计 - 新增签名和订阅模式设置表单 - 更新 API 服务层和国际化文件 - UI 组件优化(enhanced-input、pro-table)
233 lines
5.8 KiB
TypeScript
233 lines
5.8 KiB
TypeScript
// @ts-expect-error
|
|
/* eslint-disable */
|
|
import request from "@workspace/ui/lib/request";
|
|
|
|
/** Create Server POST /v1/admin/server/create */
|
|
export async function createServer(
|
|
body: API.CreateServerRequest,
|
|
options?: { [key: string]: any }
|
|
) {
|
|
return request<API.Response & { data?: any }>(
|
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/admin/server/create`,
|
|
{
|
|
method: "POST",
|
|
headers: {
|
|
"Content-Type": "application/json",
|
|
},
|
|
data: body,
|
|
...(options || {}),
|
|
}
|
|
);
|
|
}
|
|
|
|
/** Delete Server POST /v1/admin/server/delete */
|
|
export async function deleteServer(
|
|
body: API.DeleteServerRequest,
|
|
options?: { [key: string]: any }
|
|
) {
|
|
return request<API.Response & { data?: any }>(
|
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/admin/server/delete`,
|
|
{
|
|
method: "POST",
|
|
headers: {
|
|
"Content-Type": "application/json",
|
|
},
|
|
data: body,
|
|
...(options || {}),
|
|
}
|
|
);
|
|
}
|
|
|
|
/** Filter Server List GET /v1/admin/server/list */
|
|
export async function filterServerList(
|
|
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
|
|
params: API.FilterServerListParams,
|
|
options?: { [key: string]: any }
|
|
) {
|
|
return request<API.Response & { data?: API.FilterServerListResponse }>(
|
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/admin/server/list`,
|
|
{
|
|
method: "GET",
|
|
params: {
|
|
...params,
|
|
},
|
|
...(options || {}),
|
|
}
|
|
);
|
|
}
|
|
|
|
/** Create Node POST /v1/admin/server/node/create */
|
|
export async function createNode(
|
|
body: API.CreateNodeRequest,
|
|
options?: { [key: string]: any }
|
|
) {
|
|
return request<API.Response & { data?: any }>(
|
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/admin/server/node/create`,
|
|
{
|
|
method: "POST",
|
|
headers: {
|
|
"Content-Type": "application/json",
|
|
},
|
|
data: body,
|
|
...(options || {}),
|
|
}
|
|
);
|
|
}
|
|
|
|
/** Delete Node POST /v1/admin/server/node/delete */
|
|
export async function deleteNode(
|
|
body: API.DeleteNodeRequest,
|
|
options?: { [key: string]: any }
|
|
) {
|
|
return request<API.Response & { data?: any }>(
|
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/admin/server/node/delete`,
|
|
{
|
|
method: "POST",
|
|
headers: {
|
|
"Content-Type": "application/json",
|
|
},
|
|
data: body,
|
|
...(options || {}),
|
|
}
|
|
);
|
|
}
|
|
|
|
/** Filter Node List GET /v1/admin/server/node/list */
|
|
export async function filterNodeList(
|
|
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
|
|
params: API.FilterNodeListParams,
|
|
options?: { [key: string]: any }
|
|
) {
|
|
return request<API.Response & { data?: API.FilterNodeListResponse }>(
|
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/admin/server/node/list`,
|
|
{
|
|
method: "GET",
|
|
params: {
|
|
...params,
|
|
},
|
|
...(options || {}),
|
|
}
|
|
);
|
|
}
|
|
|
|
/** Reset node sort POST /v1/admin/server/node/sort */
|
|
export async function resetSortWithNode(
|
|
body: API.ResetSortRequest,
|
|
options?: { [key: string]: any }
|
|
) {
|
|
return request<API.Response & { data?: any }>(
|
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/admin/server/node/sort`,
|
|
{
|
|
method: "POST",
|
|
headers: {
|
|
"Content-Type": "application/json",
|
|
},
|
|
data: body,
|
|
...(options || {}),
|
|
}
|
|
);
|
|
}
|
|
|
|
/** Toggle Node Status POST /v1/admin/server/node/status/toggle */
|
|
export async function toggleNodeStatus(
|
|
body: API.ToggleNodeStatusRequest,
|
|
options?: { [key: string]: any }
|
|
) {
|
|
return request<API.Response & { data?: any }>(
|
|
`${
|
|
import.meta.env.VITE_API_PREFIX || ""
|
|
}/v1/admin/server/node/status/toggle`,
|
|
{
|
|
method: "POST",
|
|
headers: {
|
|
"Content-Type": "application/json",
|
|
},
|
|
data: body,
|
|
...(options || {}),
|
|
}
|
|
);
|
|
}
|
|
|
|
/** Query all node tags GET /v1/admin/server/node/tags */
|
|
export async function queryNodeTag(options?: { [key: string]: any }) {
|
|
return request<API.Response & { data?: API.QueryNodeTagResponse }>(
|
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/admin/server/node/tags`,
|
|
{
|
|
method: "GET",
|
|
...(options || {}),
|
|
}
|
|
);
|
|
}
|
|
|
|
/** Update Node POST /v1/admin/server/node/update */
|
|
export async function updateNode(
|
|
body: API.UpdateNodeRequest,
|
|
options?: { [key: string]: any }
|
|
) {
|
|
return request<API.Response & { data?: any }>(
|
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/admin/server/node/update`,
|
|
{
|
|
method: "POST",
|
|
headers: {
|
|
"Content-Type": "application/json",
|
|
},
|
|
data: body,
|
|
...(options || {}),
|
|
}
|
|
);
|
|
}
|
|
|
|
/** Get Server Protocols GET /v1/admin/server/protocols */
|
|
export async function getServerProtocols(
|
|
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
|
|
params: API.GetServerProtocolsParams,
|
|
options?: { [key: string]: any }
|
|
) {
|
|
return request<API.Response & { data?: API.GetServerProtocolsResponse }>(
|
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/admin/server/protocols`,
|
|
{
|
|
method: "GET",
|
|
params: {
|
|
...params,
|
|
},
|
|
...(options || {}),
|
|
}
|
|
);
|
|
}
|
|
|
|
/** Reset server sort POST /v1/admin/server/server/sort */
|
|
export async function resetSortWithServer(
|
|
body: API.ResetSortRequest,
|
|
options?: { [key: string]: any }
|
|
) {
|
|
return request<API.Response & { data?: any }>(
|
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/admin/server/server/sort`,
|
|
{
|
|
method: "POST",
|
|
headers: {
|
|
"Content-Type": "application/json",
|
|
},
|
|
data: body,
|
|
...(options || {}),
|
|
}
|
|
);
|
|
}
|
|
|
|
/** Update Server POST /v1/admin/server/update */
|
|
export async function updateServer(
|
|
body: API.UpdateServerRequest,
|
|
options?: { [key: string]: any }
|
|
) {
|
|
return request<API.Response & { data?: any }>(
|
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/admin/server/update`,
|
|
{
|
|
method: "POST",
|
|
headers: {
|
|
"Content-Type": "application/json",
|
|
},
|
|
data: body,
|
|
...(options || {}),
|
|
}
|
|
);
|
|
}
|