chore: Update openapi

This commit is contained in:
Shu Guang 2025-05-15 19:24:58 +08:00
parent 06e2371843
commit 8ad4263e2a
4 changed files with 128 additions and 2 deletions

View File

@ -17,6 +17,14 @@ export async function addChartUsingPost(
}); });
} }
/** countCharts GET /api/chart/count */
export async function countChartsUsingGet(options?: { [key: string]: any }) {
return request<API.BaseResponseLong_>('/api/chart/count', {
method: 'GET',
...(options || {}),
});
}
/** deleteChart POST /api/chart/delete */ /** deleteChart POST /api/chart/delete */
export async function deleteChartUsingPost( export async function deleteChartUsingPost(
body: API.DeleteRequest, 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.BaseResponseMapStringObject_>('/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.BaseResponseDouble_>('/api/chart/gen/success-rate', {
method: 'GET',
...(options || {}),
});
}
/** getChartById GET /api/chart/get */ /** getChartById GET /api/chart/get */
export async function getChartByIdUsingGet( export async function getChartByIdUsingGet(
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象) // 叠加生成的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.BaseResponseLong_>('/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.BaseResponseDouble_>('/api/chart/my/gen/success-rate', {
method: 'GET',
...(options || {}),
});
}
/** listMyChartByPage POST /api/chart/my/list/page */ /** listMyChartByPage POST /api/chart/my/list/page */
export async function listMyChartByPageUsingPost( export async function listMyChartByPageUsingPost(
body: API.ChartQueryRequest, 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.BaseResponseLong_>('/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.BaseResponseListInt_>('/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.BaseResponseLong_>('/api/chart/today/count', {
method: 'GET',
...(options || {}),
});
}
/** updateChart POST /api/chart/update */ /** updateChart POST /api/chart/update */
export async function updateChartUsingPost( export async function updateChartUsingPost(
body: API.ChartUpdateRequest, body: API.ChartUpdateRequest,
@ -188,3 +252,11 @@ export async function updateChartUsingPost(
...(options || {}), ...(options || {}),
}); });
} }
/** getWeekChartSuccessCount GET /api/chart/week/success/count */
export async function getWeekChartSuccessCountUsingGet(options?: { [key: string]: any }) {
return request<API.BaseResponseListInt_>('/api/chart/week/success/count', {
method: 'GET',
...(options || {}),
});
}

View File

@ -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.BaseResponseLong_>('/api/post/count', {
method: 'GET',
...(options || {}),
});
}
/** deletePost POST /api/post/delete */ /** deletePost POST /api/post/delete */
export async function deletePostUsingPost( export async function deletePostUsingPost(
body: API.DeleteRequest, 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.BaseResponseListPostVO_>('/api/post/list/all', {
method: 'GET',
...(options || {}),
});
}
/** listPostByPage POST /api/post/list/page */ /** listPostByPage POST /api/post/list/page */
export async function listPostByPageUsingPost( export async function listPostByPageUsingPost(
body: API.PostQueryRequest, 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.BaseResponseLong_>('/api/post/my/count', {
method: 'GET',
...(options || {}),
});
}
/** listMyPostVOByPage POST /api/post/my/list/page/vo */ /** listMyPostVOByPage POST /api/post/my/list/page/vo */
export async function listMyPostVoByPageUsingPost( export async function listMyPostVoByPageUsingPost(
body: API.PostQueryRequest, body: API.PostQueryRequest,

View File

@ -22,12 +22,30 @@ declare namespace API {
message?: string; message?: string;
}; };
type BaseResponseDouble_ = {
code?: number;
data?: number;
message?: string;
};
type BaseResponseInt_ = { type BaseResponseInt_ = {
code?: number; code?: number;
data?: number; data?: number;
message?: string; message?: string;
}; };
type BaseResponseListInt_ = {
code?: number;
data?: number[];
message?: string;
};
type BaseResponseListPostVO_ = {
code?: number;
data?: PostVO[];
message?: string;
};
type BaseResponseLoginUserVO_ = { type BaseResponseLoginUserVO_ = {
code?: number; code?: number;
data?: LoginUserVO; data?: LoginUserVO;
@ -40,6 +58,12 @@ declare namespace API {
message?: string; message?: string;
}; };
type BaseResponseMapStringObject_ = {
code?: number;
data?: Record<string, any>;
message?: string;
};
type BaseResponsePageChart_ = { type BaseResponsePageChart_ = {
code?: number; code?: number;
data?: PageChart_; data?: PageChart_;
@ -278,7 +302,6 @@ declare namespace API {
createTime?: string; createTime?: string;
favourNum?: number; favourNum?: number;
id?: number; id?: number;
isDelete?: number;
tags?: string; tags?: string;
thumbNum?: number; thumbNum?: number;
title?: string; title?: string;
@ -361,7 +384,6 @@ declare namespace API {
type User = { type User = {
createTime?: string; createTime?: string;
id?: number; id?: number;
isDelete?: number;
updateTime?: string; updateTime?: string;
userAccount?: string; userAccount?: string;
userAvatar?: string; userAvatar?: string;

View File

@ -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.BaseResponseLong_>('/api/user/count', {
method: 'GET',
...(options || {}),
});
}
/** deleteUser POST /api/user/delete */ /** deleteUser POST /api/user/delete */
export async function deleteUserUsingPost( export async function deleteUserUsingPost(
body: API.DeleteRequest, body: API.DeleteRequest,