diff --git a/frontend/src/api/index.ts b/frontend/src/api/index.ts index 8ec29e6..6606c56 100644 --- a/frontend/src/api/index.ts +++ b/frontend/src/api/index.ts @@ -98,6 +98,8 @@ export type { TimeSetGetOut } from './models/TimeSetGetOut'; export type { TimeSetIndexItem } from './models/TimeSetIndexItem'; export type { TimeSetReorderIn } from './models/TimeSetReorderIn'; export type { TimeSetUpdateIn } from './models/TimeSetUpdateIn'; +export type { UpdateCheckIn } from './models/UpdateCheckIn'; +export type { UpdateCheckOut } from './models/UpdateCheckOut'; export type { UserConfig_Notify } from './models/UserConfig_Notify'; export type { UserCreateOut } from './models/UserCreateOut'; export type { UserDeleteIn } from './models/UserDeleteIn'; diff --git a/frontend/src/api/models/HistoryIndexItem.ts b/frontend/src/api/models/HistoryIndexItem.ts index 5181e54..84fbf6b 100644 --- a/frontend/src/api/models/HistoryIndexItem.ts +++ b/frontend/src/api/models/HistoryIndexItem.ts @@ -3,26 +3,25 @@ /* tslint:disable */ /* eslint-disable */ export type HistoryIndexItem = { - /** - * 日期 - */ - date: string; - /** - * 状态 - */ - status: HistoryIndexItem.status; - /** - * 对应JSON文件 - */ - jsonFile: string; -}; -export namespace HistoryIndexItem { - /** - * 状态 - */ - export enum status { - DONE = '完成', - ERROR = '异常', - } + /** + * 日期 + */ + date: string + /** + * 状态 + */ + status: HistoryIndexItem.status + /** + * 对应JSON文件 + */ + jsonFile: string +} +export namespace HistoryIndexItem { + /** + * 状态 + */ + export enum status { + DONE = '完成', + ERROR = '异常', + } } - diff --git a/frontend/src/api/models/UpdateCheckIn.ts b/frontend/src/api/models/UpdateCheckIn.ts new file mode 100644 index 0000000..50588e2 --- /dev/null +++ b/frontend/src/api/models/UpdateCheckIn.ts @@ -0,0 +1,11 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +export type UpdateCheckIn = { + /** + * 当前前端版本号 + */ + current_version: string; +}; + diff --git a/frontend/src/api/models/UpdateCheckOut.ts b/frontend/src/api/models/UpdateCheckOut.ts new file mode 100644 index 0000000..52264d3 --- /dev/null +++ b/frontend/src/api/models/UpdateCheckOut.ts @@ -0,0 +1,31 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +export type UpdateCheckOut = { + /** + * 状态码 + */ + code?: number; + /** + * 操作状态 + */ + status?: string; + /** + * 操作消息 + */ + message?: string; + /** + * 是否需要更新前端 + */ + if_need_update: boolean; + /** + * 最新前端版本号 + */ + latest_version: string; + /** + * 版本更新信息字典 + */ + update_info: Record>; +}; + diff --git a/frontend/src/api/services/Service.ts b/frontend/src/api/services/Service.ts index 5cd28bf..ebe3a08 100644 --- a/frontend/src/api/services/Service.ts +++ b/frontend/src/api/services/Service.ts @@ -53,6 +53,8 @@ import type { TimeSetGetIn } from '../models/TimeSetGetIn'; import type { TimeSetGetOut } from '../models/TimeSetGetOut'; import type { TimeSetReorderIn } from '../models/TimeSetReorderIn'; import type { TimeSetUpdateIn } from '../models/TimeSetUpdateIn'; +import type { UpdateCheckIn } from '../models/UpdateCheckIn'; +import type { UpdateCheckOut } from '../models/UpdateCheckOut'; import type { UserCreateOut } from '../models/UserCreateOut'; import type { UserDeleteIn } from '../models/UserDeleteIn'; import type { UserGetIn } from '../models/UserGetIn'; @@ -956,4 +958,45 @@ export class Service { }, }); } + /** + * 检查更新 + * @param requestBody + * @returns UpdateCheckOut Successful Response + * @throws ApiError + */ + public static checkUpdateApiUpdateCheckPost( + requestBody: UpdateCheckIn, + ): CancelablePromise { + return __request(OpenAPI, { + method: 'POST', + url: '/api/update/check', + body: requestBody, + mediaType: 'application/json', + errors: { + 422: `Validation Error`, + }, + }); + } + /** + * 下载更新 + * @returns OutBase Successful Response + * @throws ApiError + */ + public static downloadUpdateApiUpdateDownloadPost(): CancelablePromise { + return __request(OpenAPI, { + method: 'POST', + url: '/api/update/download', + }); + } + /** + * 安装更新 + * @returns OutBase Successful Response + * @throws ApiError + */ + public static installUpdateApiUpdateInstallPost(): CancelablePromise { + return __request(OpenAPI, { + method: 'POST', + url: '/api/update/install', + }); + } }