From 8ad4263e2a0edff5b040b6a2d4128830500506a6 Mon Sep 17 00:00:00 2001 From: Shu Guang <61069967+shuguangnet@users.noreply.github.com> Date: Thu, 15 May 2025 19:24:58 +0800 Subject: [PATCH] chore: Update openapi --- src/services/hebi/chartController.ts | 72 ++++++++++++++++++++++++++++ src/services/hebi/postController.ts | 24 ++++++++++ src/services/hebi/typings.d.ts | 26 +++++++++- src/services/hebi/userController.ts | 8 ++++ 4 files changed, 128 insertions(+), 2 deletions(-) diff --git a/src/services/hebi/chartController.ts b/src/services/hebi/chartController.ts index 1770761..2648a59 100644 --- a/src/services/hebi/chartController.ts +++ b/src/services/hebi/chartController.ts @@ -17,6 +17,14 @@ export async function addChartUsingPost( }); } +/** countCharts GET /api/chart/count */ +export async function countChartsUsingGet(options?: { [key: string]: any }) { + return request('/api/chart/count', { + method: 'GET', + ...(options || {}), + }); +} + /** deleteChart POST /api/chart/delete */ export async function deleteChartUsingPost( body: API.DeleteRequest, @@ -129,6 +137,22 @@ export async function genChartByAiAsyncUsingPost( }); } +/** getChartGenerationStats GET /api/chart/gen/stats */ +export async function getChartGenerationStatsUsingGet(options?: { [key: string]: any }) { + return request('/api/chart/gen/stats', { + method: 'GET', + ...(options || {}), + }); +} + +/** getChartGenerationSuccessRate GET /api/chart/gen/success-rate */ +export async function getChartGenerationSuccessRateUsingGet(options?: { [key: string]: any }) { + return request('/api/chart/gen/success-rate', { + method: 'GET', + ...(options || {}), + }); +} + /** getChartById GET /api/chart/get */ export async function getChartByIdUsingGet( // 叠加生成的Param类型 (非body参数swagger默认没有生成对象) @@ -159,6 +183,22 @@ export async function listChartByPageUsingPost( }); } +/** countMyCharts GET /api/chart/my/count */ +export async function countMyChartsUsingGet(options?: { [key: string]: any }) { + return request('/api/chart/my/count', { + method: 'GET', + ...(options || {}), + }); +} + +/** getMyChartGenerationSuccessRate GET /api/chart/my/gen/success-rate */ +export async function getMyChartGenerationSuccessRateUsingGet(options?: { [key: string]: any }) { + return request('/api/chart/my/gen/success-rate', { + method: 'GET', + ...(options || {}), + }); +} + /** listMyChartByPage POST /api/chart/my/list/page */ export async function listMyChartByPageUsingPost( body: API.ChartQueryRequest, @@ -174,6 +214,30 @@ export async function listMyChartByPageUsingPost( }); } +/** getMyTodayChartCount GET /api/chart/my/today/count */ +export async function getMyTodayChartCountUsingGet(options?: { [key: string]: any }) { + return request('/api/chart/my/today/count', { + method: 'GET', + ...(options || {}), + }); +} + +/** getMyWeekChartSuccessCount GET /api/chart/my/week/success/count */ +export async function getMyWeekChartSuccessCountUsingGet(options?: { [key: string]: any }) { + return request('/api/chart/my/week/success/count', { + method: 'GET', + ...(options || {}), + }); +} + +/** getTodayChartCount GET /api/chart/today/count */ +export async function getTodayChartCountUsingGet(options?: { [key: string]: any }) { + return request('/api/chart/today/count', { + method: 'GET', + ...(options || {}), + }); +} + /** updateChart POST /api/chart/update */ export async function updateChartUsingPost( body: API.ChartUpdateRequest, @@ -188,3 +252,11 @@ export async function updateChartUsingPost( ...(options || {}), }); } + +/** getWeekChartSuccessCount GET /api/chart/week/success/count */ +export async function getWeekChartSuccessCountUsingGet(options?: { [key: string]: any }) { + return request('/api/chart/week/success/count', { + method: 'GET', + ...(options || {}), + }); +} diff --git a/src/services/hebi/postController.ts b/src/services/hebi/postController.ts index 93c2a80..24a0311 100644 --- a/src/services/hebi/postController.ts +++ b/src/services/hebi/postController.ts @@ -14,6 +14,14 @@ export async function addPostUsingPost(body: API.PostAddRequest, options?: { [ke }); } +/** countPosts GET /api/post/count */ +export async function countPostsUsingGet(options?: { [key: string]: any }) { + return request('/api/post/count', { + method: 'GET', + ...(options || {}), + }); +} + /** deletePost POST /api/post/delete */ export async function deletePostUsingPost( body: API.DeleteRequest, @@ -59,6 +67,14 @@ export async function getPostVoByIdUsingGet( }); } +/** listAllPosts GET /api/post/list/all */ +export async function listAllPostsUsingGet(options?: { [key: string]: any }) { + return request('/api/post/list/all', { + method: 'GET', + ...(options || {}), + }); +} + /** listPostByPage POST /api/post/list/page */ export async function listPostByPageUsingPost( body: API.PostQueryRequest, @@ -89,6 +105,14 @@ export async function listPostVoByPageUsingPost( }); } +/** countMyPosts GET /api/post/my/count */ +export async function countMyPostsUsingGet(options?: { [key: string]: any }) { + return request('/api/post/my/count', { + method: 'GET', + ...(options || {}), + }); +} + /** listMyPostVOByPage POST /api/post/my/list/page/vo */ export async function listMyPostVoByPageUsingPost( body: API.PostQueryRequest, diff --git a/src/services/hebi/typings.d.ts b/src/services/hebi/typings.d.ts index 57e3c96..dd4f772 100644 --- a/src/services/hebi/typings.d.ts +++ b/src/services/hebi/typings.d.ts @@ -22,12 +22,30 @@ declare namespace API { message?: string; }; + type BaseResponseDouble_ = { + code?: number; + data?: number; + message?: string; + }; + type BaseResponseInt_ = { code?: number; data?: number; message?: string; }; + type BaseResponseListInt_ = { + code?: number; + data?: number[]; + message?: string; + }; + + type BaseResponseListPostVO_ = { + code?: number; + data?: PostVO[]; + message?: string; + }; + type BaseResponseLoginUserVO_ = { code?: number; data?: LoginUserVO; @@ -40,6 +58,12 @@ declare namespace API { message?: string; }; + type BaseResponseMapStringObject_ = { + code?: number; + data?: Record; + message?: string; + }; + type BaseResponsePageChart_ = { code?: number; data?: PageChart_; @@ -278,7 +302,6 @@ declare namespace API { createTime?: string; favourNum?: number; id?: number; - isDelete?: number; tags?: string; thumbNum?: number; title?: string; @@ -361,7 +384,6 @@ declare namespace API { type User = { createTime?: string; id?: number; - isDelete?: number; updateTime?: string; userAccount?: string; userAvatar?: string; diff --git a/src/services/hebi/userController.ts b/src/services/hebi/userController.ts index c18e94e..6943bc8 100644 --- a/src/services/hebi/userController.ts +++ b/src/services/hebi/userController.ts @@ -14,6 +14,14 @@ export async function addUserUsingPost(body: API.UserAddRequest, options?: { [ke }); } +/** countUsers GET /api/user/count */ +export async function countUsersUsingGet(options?: { [key: string]: any }) { + return request('/api/user/count', { + method: 'GET', + ...(options || {}), + }); +} + /** deleteUser POST /api/user/delete */ export async function deleteUserUsingPost( body: API.DeleteRequest,