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

View File

@ -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<string, any>;
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;

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 */
export async function deleteUserUsingPost(
body: API.DeleteRequest,