WEB/src/servers/api/template.ts

120 lines
3.5 KiB
TypeScript

// @ts-ignore
/* eslint-disable */
import { request } from 'umi';
/** 此处后端没有提供注释 POST /template/ */
export async function templatecontrollerCreatetemplate(
body: API.CreateTemplateDTO,
options?: { [key: string]: any },
) {
return request<API.Template>('/template/', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
data: body,
...(options || {}),
});
}
/** 此处后端没有提供注释 GET /template/${param0} */
export async function templatecontrollerGettemplatebyname(
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
params: API.templatecontrollerGettemplatebynameParams,
options?: { [key: string]: any },
) {
const { name: param0, ...queryParams } = params;
return request<API.Template>(`/template/${param0}`, {
method: 'GET',
params: { ...queryParams },
...(options || {}),
});
}
/** 此处后端没有提供注释 PUT /template/${param0} */
export async function templatecontrollerUpdatetemplate(
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
params: API.templatecontrollerUpdatetemplateParams,
body: API.UpdateTemplateDTO,
options?: { [key: string]: any },
) {
const { id: param0, ...queryParams } = params;
return request<API.Template>(`/template/${param0}`, {
method: 'PUT',
headers: {
'Content-Type': 'application/json',
},
params: { ...queryParams },
data: body,
...(options || {}),
});
}
/** 此处后端没有提供注释 DELETE /template/${param0} */
export async function templatecontrollerDeletetemplate(
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
params: API.templatecontrollerDeletetemplateParams,
options?: { [key: string]: any },
) {
const { id: param0, ...queryParams } = params;
return request<API.BooleanRes>(`/template/${param0}`, {
method: 'DELETE',
params: { ...queryParams },
...(options || {}),
});
}
/** 此处后端没有提供注释 POST /template/backfill-testdata */
export async function templatecontrollerBackfilltestdata(options?: {
[key: string]: any;
}) {
return request<Record<string, any>>('/template/backfill-testdata', {
method: 'POST',
...(options || {}),
});
}
/** 此处后端没有提供注释 GET /template/list */
export async function templatecontrollerGettemplatelist(options?: {
[key: string]: any;
}) {
return request<API.Template[]>('/template/list', {
method: 'GET',
...(options || {}),
});
}
/** 此处后端没有提供注释 POST /template/render-direct */
export async function templatecontrollerRendertemplatedirect(
body: API.RenderTemplateDTO,
options?: { [key: string]: any },
) {
return request<Record<string, any>>('/template/render-direct', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
data: body,
...(options || {}),
});
}
/** 此处后端没有提供注释 POST /template/render/${param0} */
export async function templatecontrollerRendertemplate(
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
params: API.templatecontrollerRendertemplateParams,
body: Record<string, any>,
options?: { [key: string]: any },
) {
const { name: param0, ...queryParams } = params;
return request<Record<string, any>>(`/template/render/${param0}`, {
method: 'POST',
headers: {
'Content-Type': 'text/plain',
},
params: { ...queryParams },
data: body,
...(options || {}),
});
}