refactor: 更新后端接口api
This commit is contained in:
@@ -44,6 +44,7 @@ export type { MaaUserConfig } from './models/MaaUserConfig';
|
||||
export type { MaaUserConfig_Data } from './models/MaaUserConfig_Data';
|
||||
export type { MaaUserConfig_Info } from './models/MaaUserConfig_Info';
|
||||
export type { MaaUserConfig_Task } from './models/MaaUserConfig_Task';
|
||||
export type { NoticeOut } from './models/NoticeOut';
|
||||
export type { OutBase } from './models/OutBase';
|
||||
export type { PlanCreateIn } from './models/PlanCreateIn';
|
||||
export type { PlanCreateOut } from './models/PlanCreateOut';
|
||||
@@ -53,6 +54,7 @@ export type { PlanGetOut } from './models/PlanGetOut';
|
||||
export type { PlanIndexItem } from './models/PlanIndexItem';
|
||||
export type { PlanReorderIn } from './models/PlanReorderIn';
|
||||
export type { PlanUpdateIn } from './models/PlanUpdateIn';
|
||||
export { PowerIn } from './models/PowerIn';
|
||||
export type { QueueConfig } from './models/QueueConfig';
|
||||
export type { QueueConfig_Info } from './models/QueueConfig_Info';
|
||||
export type { QueueCreateOut } from './models/QueueCreateOut';
|
||||
@@ -75,11 +77,14 @@ export type { QueueUpdateIn } from './models/QueueUpdateIn';
|
||||
export { ScriptCreateIn } from './models/ScriptCreateIn';
|
||||
export type { ScriptCreateOut } from './models/ScriptCreateOut';
|
||||
export type { ScriptDeleteIn } from './models/ScriptDeleteIn';
|
||||
export type { ScriptFileIn } from './models/ScriptFileIn';
|
||||
export type { ScriptGetIn } from './models/ScriptGetIn';
|
||||
export type { ScriptGetOut } from './models/ScriptGetOut';
|
||||
export { ScriptIndexItem } from './models/ScriptIndexItem';
|
||||
export type { ScriptReorderIn } from './models/ScriptReorderIn';
|
||||
export type { ScriptUpdateIn } from './models/ScriptUpdateIn';
|
||||
export type { ScriptUploadIn } from './models/ScriptUploadIn';
|
||||
export type { ScriptUrlIn } from './models/ScriptUrlIn';
|
||||
export type { SettingGetOut } from './models/SettingGetOut';
|
||||
export type { SettingUpdateIn } from './models/SettingUpdateIn';
|
||||
export { TaskCreateIn } from './models/TaskCreateIn';
|
||||
@@ -101,6 +106,7 @@ export type { UserGetOut } from './models/UserGetOut';
|
||||
export type { UserInBase } from './models/UserInBase';
|
||||
export { UserIndexItem } from './models/UserIndexItem';
|
||||
export type { UserReorderIn } from './models/UserReorderIn';
|
||||
export type { UserSetIn } from './models/UserSetIn';
|
||||
export type { UserUpdateIn } from './models/UserUpdateIn';
|
||||
export type { ValidationError } from './models/ValidationError';
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
/* eslint-disable */
|
||||
export type DispatchIn = {
|
||||
/**
|
||||
* 目标任务ID,设置类任务可选对应脚本ID或用户ID,代理类任务可选对应队列ID或脚本ID
|
||||
* 目标任务ID, 设置类任务可选对应脚本ID或用户ID, 代理类任务可选对应队列ID或脚本ID
|
||||
*/
|
||||
taskId: string;
|
||||
};
|
||||
|
||||
@@ -21,8 +21,8 @@ export namespace HistoryIndexItem {
|
||||
* 状态
|
||||
*/
|
||||
export enum status {
|
||||
DONE = '完成',
|
||||
ERROR = '异常',
|
||||
DONE = '完成',
|
||||
ERROR = '异常',
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -23,6 +23,6 @@ export namespace HistorySearchIn {
|
||||
export enum mode {
|
||||
DAILY = '按日合并',
|
||||
WEEKLY = '按周合并',
|
||||
MONTHLY = '按年月并',
|
||||
MONTHLY = '按月合并',
|
||||
}
|
||||
}
|
||||
|
||||
27
frontend/src/api/models/NoticeOut.ts
Normal file
27
frontend/src/api/models/NoticeOut.ts
Normal file
@@ -0,0 +1,27 @@
|
||||
/* generated using openapi-typescript-codegen -- do not edit */
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
export type NoticeOut = {
|
||||
/**
|
||||
* 状态码
|
||||
*/
|
||||
code?: number;
|
||||
/**
|
||||
* 操作状态
|
||||
*/
|
||||
status?: string;
|
||||
/**
|
||||
* 操作消息
|
||||
*/
|
||||
message?: string;
|
||||
/**
|
||||
* 是否需要显示公告
|
||||
*/
|
||||
if_need_show: boolean;
|
||||
/**
|
||||
* 公告信息, key为公告标题, value为公告内容
|
||||
*/
|
||||
data: Record<string, string>;
|
||||
};
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
/* eslint-disable */
|
||||
export type PlanReorderIn = {
|
||||
/**
|
||||
* 计划ID列表,按新顺序排列
|
||||
* 计划ID列表, 按新顺序排列
|
||||
*/
|
||||
indexList: Array<string>;
|
||||
};
|
||||
|
||||
24
frontend/src/api/models/PowerIn.ts
Normal file
24
frontend/src/api/models/PowerIn.ts
Normal file
@@ -0,0 +1,24 @@
|
||||
/* generated using openapi-typescript-codegen -- do not edit */
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
export type PowerIn = {
|
||||
/**
|
||||
* 电源操作信号
|
||||
*/
|
||||
signal: PowerIn.signal;
|
||||
};
|
||||
export namespace PowerIn {
|
||||
/**
|
||||
* 电源操作信号
|
||||
*/
|
||||
export enum signal {
|
||||
NO_ACTION = 'NoAction',
|
||||
SHUTDOWN = 'Shutdown',
|
||||
SHUTDOWN_FORCE = 'ShutdownForce',
|
||||
HIBERNATE = 'Hibernate',
|
||||
SLEEP = 'Sleep',
|
||||
KILL_SELF = 'KillSelf',
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@ export type QueueItemReorderIn = {
|
||||
*/
|
||||
queueId: string;
|
||||
/**
|
||||
* 队列项ID列表,按新顺序排列
|
||||
* 队列项ID列表, 按新顺序排列
|
||||
*/
|
||||
indexList: Array<string>;
|
||||
};
|
||||
|
||||
15
frontend/src/api/models/ScriptFileIn.ts
Normal file
15
frontend/src/api/models/ScriptFileIn.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
/* generated using openapi-typescript-codegen -- do not edit */
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
export type ScriptFileIn = {
|
||||
/**
|
||||
* 脚本ID
|
||||
*/
|
||||
scriptId: string;
|
||||
/**
|
||||
* 配置文件路径
|
||||
*/
|
||||
jsonFile: string;
|
||||
};
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
/* eslint-disable */
|
||||
export type ScriptReorderIn = {
|
||||
/**
|
||||
* 脚本ID列表,按新顺序排列
|
||||
* 脚本ID列表, 按新顺序排列
|
||||
*/
|
||||
indexList: Array<string>;
|
||||
};
|
||||
|
||||
23
frontend/src/api/models/ScriptUploadIn.ts
Normal file
23
frontend/src/api/models/ScriptUploadIn.ts
Normal file
@@ -0,0 +1,23 @@
|
||||
/* generated using openapi-typescript-codegen -- do not edit */
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
export type ScriptUploadIn = {
|
||||
/**
|
||||
* 脚本ID
|
||||
*/
|
||||
scriptId: string;
|
||||
/**
|
||||
* 配置名称
|
||||
*/
|
||||
config_name: string;
|
||||
/**
|
||||
* 作者
|
||||
*/
|
||||
author: string;
|
||||
/**
|
||||
* 描述
|
||||
*/
|
||||
description: string;
|
||||
};
|
||||
|
||||
15
frontend/src/api/models/ScriptUrlIn.ts
Normal file
15
frontend/src/api/models/ScriptUrlIn.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
/* generated using openapi-typescript-codegen -- do not edit */
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
export type ScriptUrlIn = {
|
||||
/**
|
||||
* 脚本ID
|
||||
*/
|
||||
scriptId: string;
|
||||
/**
|
||||
* 配置文件URL
|
||||
*/
|
||||
url: string;
|
||||
};
|
||||
|
||||
@@ -3,23 +3,22 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
export type TaskCreateIn = {
|
||||
/**
|
||||
* 目标任务ID,设置类任务可选对应脚本ID或用户ID,代理类任务可选对应队列ID或脚本ID
|
||||
*/
|
||||
taskId: string;
|
||||
/**
|
||||
* 任务模式
|
||||
*/
|
||||
mode: TaskCreateIn.mode;
|
||||
};
|
||||
export namespace TaskCreateIn {
|
||||
/**
|
||||
* 任务模式
|
||||
*/
|
||||
export enum mode {
|
||||
AutoMode = '自动代理',
|
||||
ManualMode = '人工排查',
|
||||
SettingScriptMode = '设置脚本',
|
||||
}
|
||||
/**
|
||||
* 目标任务ID, 设置类任务可选对应脚本ID或用户ID, 代理类任务可选对应队列ID或脚本ID
|
||||
*/
|
||||
taskId: string
|
||||
/**
|
||||
* 任务模式
|
||||
*/
|
||||
mode: TaskCreateIn.mode
|
||||
}
|
||||
export namespace TaskCreateIn {
|
||||
/**
|
||||
* 任务模式
|
||||
*/
|
||||
export enum mode {
|
||||
AutoMode = '自动代理',
|
||||
ManualMode = '人工排查',
|
||||
SettingScriptMode = '设置脚本',
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ export type TimeSetReorderIn = {
|
||||
*/
|
||||
queueId: string;
|
||||
/**
|
||||
* 时间设置ID列表,按新顺序排列
|
||||
* 时间设置ID列表, 按新顺序排列
|
||||
*/
|
||||
indexList: Array<string>;
|
||||
};
|
||||
|
||||
@@ -8,7 +8,7 @@ export type UserReorderIn = {
|
||||
*/
|
||||
scriptId: string;
|
||||
/**
|
||||
* 用户ID列表,按新顺序排列
|
||||
* 用户ID列表, 按新顺序排列
|
||||
*/
|
||||
indexList: Array<string>;
|
||||
};
|
||||
|
||||
19
frontend/src/api/models/UserSetIn.ts
Normal file
19
frontend/src/api/models/UserSetIn.ts
Normal file
@@ -0,0 +1,19 @@
|
||||
/* generated using openapi-typescript-codegen -- do not edit */
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
export type UserSetIn = {
|
||||
/**
|
||||
* 所属脚本ID
|
||||
*/
|
||||
scriptId: string;
|
||||
/**
|
||||
* 用户ID
|
||||
*/
|
||||
userId: string;
|
||||
/**
|
||||
* JSON文件路径, 用于导入自定义基建文件
|
||||
*/
|
||||
jsonFile: string;
|
||||
};
|
||||
|
||||
@@ -10,6 +10,7 @@ import type { HistoryDataGetOut } from '../models/HistoryDataGetOut';
|
||||
import type { HistorySearchIn } from '../models/HistorySearchIn';
|
||||
import type { HistorySearchOut } from '../models/HistorySearchOut';
|
||||
import type { InfoOut } from '../models/InfoOut';
|
||||
import type { NoticeOut } from '../models/NoticeOut';
|
||||
import type { OutBase } from '../models/OutBase';
|
||||
import type { PlanCreateIn } from '../models/PlanCreateIn';
|
||||
import type { PlanCreateOut } from '../models/PlanCreateOut';
|
||||
@@ -18,6 +19,7 @@ import type { PlanGetIn } from '../models/PlanGetIn';
|
||||
import type { PlanGetOut } from '../models/PlanGetOut';
|
||||
import type { PlanReorderIn } from '../models/PlanReorderIn';
|
||||
import type { PlanUpdateIn } from '../models/PlanUpdateIn';
|
||||
import type { PowerIn } from '../models/PowerIn';
|
||||
import type { QueueCreateOut } from '../models/QueueCreateOut';
|
||||
import type { QueueDeleteIn } from '../models/QueueDeleteIn';
|
||||
import type { QueueGetIn } from '../models/QueueGetIn';
|
||||
@@ -34,10 +36,13 @@ import type { QueueUpdateIn } from '../models/QueueUpdateIn';
|
||||
import type { ScriptCreateIn } from '../models/ScriptCreateIn';
|
||||
import type { ScriptCreateOut } from '../models/ScriptCreateOut';
|
||||
import type { ScriptDeleteIn } from '../models/ScriptDeleteIn';
|
||||
import type { ScriptFileIn } from '../models/ScriptFileIn';
|
||||
import type { ScriptGetIn } from '../models/ScriptGetIn';
|
||||
import type { ScriptGetOut } from '../models/ScriptGetOut';
|
||||
import type { ScriptReorderIn } from '../models/ScriptReorderIn';
|
||||
import type { ScriptUpdateIn } from '../models/ScriptUpdateIn';
|
||||
import type { ScriptUploadIn } from '../models/ScriptUploadIn';
|
||||
import type { ScriptUrlIn } from '../models/ScriptUrlIn';
|
||||
import type { SettingGetOut } from '../models/SettingGetOut';
|
||||
import type { SettingUpdateIn } from '../models/SettingUpdateIn';
|
||||
import type { TaskCreateIn } from '../models/TaskCreateIn';
|
||||
@@ -54,6 +59,7 @@ import type { UserGetIn } from '../models/UserGetIn';
|
||||
import type { UserGetOut } from '../models/UserGetOut';
|
||||
import type { UserInBase } from '../models/UserInBase';
|
||||
import type { UserReorderIn } from '../models/UserReorderIn';
|
||||
import type { UserSetIn } from '../models/UserSetIn';
|
||||
import type { UserUpdateIn } from '../models/UserUpdateIn';
|
||||
import type { CancelablePromise } from '../core/CancelablePromise';
|
||||
import { OpenAPI } from '../core/OpenAPI';
|
||||
@@ -101,25 +107,58 @@ export class Service {
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 获取通知信息
|
||||
* @returns InfoOut Successful Response
|
||||
* 获取可选计划下拉框信息
|
||||
* @returns ComboBoxOut Successful Response
|
||||
* @throws ApiError
|
||||
*/
|
||||
public static getNoticeInfoApiInfoNoticePost(): CancelablePromise<InfoOut> {
|
||||
public static getPlanComboxApiInfoComboxPlanPost(): CancelablePromise<ComboBoxOut> {
|
||||
return __request(OpenAPI, {
|
||||
method: 'POST',
|
||||
url: '/api/info/notice',
|
||||
url: '/api/info/combox/plan',
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 获取可下载应用信息
|
||||
* 获取通知信息
|
||||
* @returns NoticeOut Successful Response
|
||||
* @throws ApiError
|
||||
*/
|
||||
public static getNoticeInfoApiInfoNoticeGetPost(): CancelablePromise<NoticeOut> {
|
||||
return __request(OpenAPI, {
|
||||
method: 'POST',
|
||||
url: '/api/info/notice/get',
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 确认通知
|
||||
* @returns OutBase Successful Response
|
||||
* @throws ApiError
|
||||
*/
|
||||
public static confirmNoticeApiInfoNoticeConfirmPost(): CancelablePromise<OutBase> {
|
||||
return __request(OpenAPI, {
|
||||
method: 'POST',
|
||||
url: '/api/info/notice/confirm',
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 获取启动时运行的队列ID
|
||||
* @returns InfoOut Successful Response
|
||||
* @throws ApiError
|
||||
*/
|
||||
public static getAppsInfoApiInfoAppsInfoPost(): CancelablePromise<InfoOut> {
|
||||
public static getStartupTaskApiInfoStartuptaskPost(): CancelablePromise<InfoOut> {
|
||||
return __request(OpenAPI, {
|
||||
method: 'POST',
|
||||
url: '/api/info/apps_info',
|
||||
url: '/api/info/startuptask',
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 获取配置分享中心的配置信息
|
||||
* @returns InfoOut Successful Response
|
||||
* @throws ApiError
|
||||
*/
|
||||
public static getWebConfigApiInfoWebconfigPost(): CancelablePromise<InfoOut> {
|
||||
return __request(OpenAPI, {
|
||||
method: 'POST',
|
||||
url: '/api/info/webconfig',
|
||||
});
|
||||
}
|
||||
/**
|
||||
@@ -127,7 +166,7 @@ export class Service {
|
||||
* @returns InfoOut Successful Response
|
||||
* @throws ApiError
|
||||
*/
|
||||
public static addOverviewApiInfoGetOverviewPost(): CancelablePromise<InfoOut> {
|
||||
public static getOverviewApiInfoGetOverviewPost(): CancelablePromise<InfoOut> {
|
||||
return __request(OpenAPI, {
|
||||
method: 'POST',
|
||||
url: '/api/info/get/overview',
|
||||
@@ -228,6 +267,82 @@ export class Service {
|
||||
},
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 从文件加载脚本
|
||||
* @param requestBody
|
||||
* @returns OutBase Successful Response
|
||||
* @throws ApiError
|
||||
*/
|
||||
public static importScriptFromFileApiScriptsImportFilePost(
|
||||
requestBody: ScriptFileIn,
|
||||
): CancelablePromise<OutBase> {
|
||||
return __request(OpenAPI, {
|
||||
method: 'POST',
|
||||
url: '/api/scripts/import/file',
|
||||
body: requestBody,
|
||||
mediaType: 'application/json',
|
||||
errors: {
|
||||
422: `Validation Error`,
|
||||
},
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 导出脚本到文件
|
||||
* @param requestBody
|
||||
* @returns OutBase Successful Response
|
||||
* @throws ApiError
|
||||
*/
|
||||
public static exportScriptToFileApiScriptsExportFilePost(
|
||||
requestBody: ScriptFileIn,
|
||||
): CancelablePromise<OutBase> {
|
||||
return __request(OpenAPI, {
|
||||
method: 'POST',
|
||||
url: '/api/scripts/export/file',
|
||||
body: requestBody,
|
||||
mediaType: 'application/json',
|
||||
errors: {
|
||||
422: `Validation Error`,
|
||||
},
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 从网络加载脚本
|
||||
* @param requestBody
|
||||
* @returns OutBase Successful Response
|
||||
* @throws ApiError
|
||||
*/
|
||||
public static importScriptFromWebApiScriptsImportWebPost(
|
||||
requestBody: ScriptUrlIn,
|
||||
): CancelablePromise<OutBase> {
|
||||
return __request(OpenAPI, {
|
||||
method: 'POST',
|
||||
url: '/api/scripts/import/web',
|
||||
body: requestBody,
|
||||
mediaType: 'application/json',
|
||||
errors: {
|
||||
422: `Validation Error`,
|
||||
},
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 上传脚本配置到网络
|
||||
* @param requestBody
|
||||
* @returns OutBase Successful Response
|
||||
* @throws ApiError
|
||||
*/
|
||||
public static uploadScriptToWebApiScriptsUploadWebPost(
|
||||
requestBody: ScriptUploadIn,
|
||||
): CancelablePromise<OutBase> {
|
||||
return __request(OpenAPI, {
|
||||
method: 'POST',
|
||||
url: '/api/scripts/Upload/web',
|
||||
body: requestBody,
|
||||
mediaType: 'application/json',
|
||||
errors: {
|
||||
422: `Validation Error`,
|
||||
},
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 查询用户
|
||||
* @param requestBody
|
||||
@@ -323,6 +438,25 @@ export class Service {
|
||||
},
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 导入基建配置文件
|
||||
* @param requestBody
|
||||
* @returns OutBase Successful Response
|
||||
* @throws ApiError
|
||||
*/
|
||||
public static importInfrastructureApiScriptsUserInfrastructurePost(
|
||||
requestBody: UserSetIn,
|
||||
): CancelablePromise<OutBase> {
|
||||
return __request(OpenAPI, {
|
||||
method: 'POST',
|
||||
url: '/api/scripts/user/infrastructure',
|
||||
body: requestBody,
|
||||
mediaType: 'application/json',
|
||||
errors: {
|
||||
422: `Validation Error`,
|
||||
},
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 添加计划表
|
||||
* @param requestBody
|
||||
@@ -733,6 +867,25 @@ export class Service {
|
||||
},
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 电源操作
|
||||
* @param requestBody
|
||||
* @returns OutBase Successful Response
|
||||
* @throws ApiError
|
||||
*/
|
||||
public static powerTaskApiDispatchPowerPost(
|
||||
requestBody: PowerIn,
|
||||
): CancelablePromise<OutBase> {
|
||||
return __request(OpenAPI, {
|
||||
method: 'POST',
|
||||
url: '/api/dispatch/power',
|
||||
body: requestBody,
|
||||
mediaType: 'application/json',
|
||||
errors: {
|
||||
422: `Validation Error`,
|
||||
},
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 搜索历史记录总览信息
|
||||
* @param requestBody
|
||||
|
||||
Reference in New Issue
Block a user