232 lines
5.5 KiB
TypeScript
232 lines
5.5 KiB
TypeScript
// @ts-ignore
|
|
/* eslint-disable */
|
|
import { request } from '@umijs/max';
|
|
|
|
/** addChart POST /api/chart/add */
|
|
export async function addChartUsingPOST(
|
|
body: API.ChartAddRequest,
|
|
options?: { [key: string]: any },
|
|
) {
|
|
return request<API.CommonResponseLong_>('/api/chart/add', {
|
|
method: 'POST',
|
|
headers: {
|
|
'Content-Type': 'application/json',
|
|
},
|
|
data: body,
|
|
...(options || {}),
|
|
});
|
|
}
|
|
|
|
/** deleteChart POST /api/chart/delete */
|
|
export async function deleteChartUsingPOST(
|
|
body: API.DeleteRequest,
|
|
options?: { [key: string]: any },
|
|
) {
|
|
return request<API.CommonResponseBoolean_>('/api/chart/delete', {
|
|
method: 'POST',
|
|
headers: {
|
|
'Content-Type': 'application/json',
|
|
},
|
|
data: body,
|
|
...(options || {}),
|
|
});
|
|
}
|
|
|
|
/** editChart POST /api/chart/edit */
|
|
export async function editChartUsingPOST(
|
|
body: API.ChartEditRequest,
|
|
options?: { [key: string]: any },
|
|
) {
|
|
return request<API.CommonResponseBoolean_>('/api/chart/edit', {
|
|
method: 'POST',
|
|
headers: {
|
|
'Content-Type': 'application/json',
|
|
},
|
|
data: body,
|
|
...(options || {}),
|
|
});
|
|
}
|
|
|
|
/** genChartByAi POST /api/chart/gen */
|
|
export async function genChartByAiUsingPOST(
|
|
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
|
|
params: API.genChartByAiUsingPOSTParams,
|
|
body: {},
|
|
file?: File,
|
|
options?: { [key: string]: any },
|
|
) {
|
|
const formData = new FormData();
|
|
|
|
if (file) {
|
|
formData.append('file', file);
|
|
}
|
|
|
|
Object.keys(body).forEach((ele) => {
|
|
const item = (body as any)[ele];
|
|
|
|
if (item !== undefined && item !== null) {
|
|
formData.append(
|
|
ele,
|
|
typeof item === 'object' && !(item instanceof File) ? JSON.stringify(item) : item,
|
|
);
|
|
}
|
|
});
|
|
|
|
return request<API.CommonResponseBiResponse_>('/api/chart/gen', {
|
|
method: 'POST',
|
|
params: {
|
|
...params,
|
|
},
|
|
data: formData,
|
|
requestType: 'form',
|
|
...(options || {}),
|
|
});
|
|
}
|
|
|
|
/** genChartByAiAsync POST /api/chart/gen/async */
|
|
export async function genChartByAiAsyncUsingPOST(
|
|
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
|
|
params: API.genChartByAiAsyncUsingPOSTParams,
|
|
body: {},
|
|
file?: File,
|
|
options?: { [key: string]: any },
|
|
) {
|
|
const formData = new FormData();
|
|
|
|
if (file) {
|
|
formData.append('file', file);
|
|
}
|
|
|
|
Object.keys(body).forEach((ele) => {
|
|
const item = (body as any)[ele];
|
|
|
|
if (item !== undefined && item !== null) {
|
|
formData.append(
|
|
ele,
|
|
typeof item === 'object' && !(item instanceof File) ? JSON.stringify(item) : item,
|
|
);
|
|
}
|
|
});
|
|
|
|
return request<API.CommonResponseBiResponse_>('/api/chart/gen/async', {
|
|
method: 'POST',
|
|
params: {
|
|
...params,
|
|
},
|
|
data: formData,
|
|
requestType: 'form',
|
|
...(options || {}),
|
|
});
|
|
}
|
|
|
|
/** genChartByAiAsyncMq POST /api/chart/gen/async/mq */
|
|
export async function genChartByAiAsyncMqUsingPOST(
|
|
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
|
|
params: API.genChartByAiAsyncMqUsingPOSTParams,
|
|
body: {},
|
|
file?: File,
|
|
options?: { [key: string]: any },
|
|
) {
|
|
const formData = new FormData();
|
|
|
|
if (file) {
|
|
formData.append('file', file);
|
|
}
|
|
|
|
Object.keys(body).forEach((ele) => {
|
|
const item = (body as any)[ele];
|
|
|
|
if (item !== undefined && item !== null) {
|
|
formData.append(
|
|
ele,
|
|
typeof item === 'object' && !(item instanceof File) ? JSON.stringify(item) : item,
|
|
);
|
|
}
|
|
});
|
|
|
|
return request<API.CommonResponseBiResponse_>('/api/chart/gen/async/mq', {
|
|
method: 'POST',
|
|
params: {
|
|
...params,
|
|
},
|
|
data: formData,
|
|
requestType: 'form',
|
|
...(options || {}),
|
|
});
|
|
}
|
|
|
|
/** getChartById GET /api/chart/get */
|
|
export async function getChartByIdUsingGET(
|
|
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
|
|
params: API.getChartByIdUsingGETParams,
|
|
options?: { [key: string]: any },
|
|
) {
|
|
return request<API.CommonResponseChart_>('/api/chart/get', {
|
|
method: 'GET',
|
|
params: {
|
|
...params,
|
|
},
|
|
...(options || {}),
|
|
});
|
|
}
|
|
|
|
/** listChartByPage POST /api/chart/list/page */
|
|
export async function listChartByPageUsingPOST(
|
|
body: API.ChartQueryRequest,
|
|
options?: { [key: string]: any },
|
|
) {
|
|
return request<API.CommonResponsePageChart_>('/api/chart/list/page', {
|
|
method: 'POST',
|
|
headers: {
|
|
'Content-Type': 'application/json',
|
|
},
|
|
data: body,
|
|
...(options || {}),
|
|
});
|
|
}
|
|
|
|
/** listMyChartByPage POST /api/chart/my/list/page */
|
|
export async function listMyChartByPageUsingPOST(
|
|
body: API.ChartQueryRequest,
|
|
options?: { [key: string]: any },
|
|
) {
|
|
return request<API.CommonResponsePageChart_>('/api/chart/my/list/page', {
|
|
method: 'POST',
|
|
headers: {
|
|
'Content-Type': 'application/json',
|
|
},
|
|
data: body,
|
|
...(options || {}),
|
|
});
|
|
}
|
|
|
|
/** regenChartByAiAsyncMq POST /api/chart/regen */
|
|
export async function regenChartByAiAsyncMqUsingPOST(
|
|
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
|
|
params: API.regenChartByAiAsyncMqUsingPOSTParams,
|
|
options?: { [key: string]: any },
|
|
) {
|
|
return request<API.CommonResponseBiResponse_>('/api/chart/regen', {
|
|
method: 'POST',
|
|
params: {
|
|
...params,
|
|
},
|
|
...(options || {}),
|
|
});
|
|
}
|
|
|
|
/** updateChart POST /api/chart/update */
|
|
export async function updateChartUsingPOST(
|
|
body: API.ChartUpdateRequest,
|
|
options?: { [key: string]: any },
|
|
) {
|
|
return request<API.CommonResponseBoolean_>('/api/chart/update', {
|
|
method: 'POST',
|
|
headers: {
|
|
'Content-Type': 'application/json',
|
|
},
|
|
data: body,
|
|
...(options || {}),
|
|
});
|
|
}
|