- Updated all service files to replace hardcoded API paths with `${import.meta.env.VITE_API_PREFIX}` for better configurability.
- Ensured consistency across user, common, and gateway services by applying the new API prefix format.
- Removed unnecessary comments and maintained ESLint disable directives where applicable.
32 lines
905 B
TypeScript
32 lines
905 B
TypeScript
/* eslint-disable */
|
|
import request from "@workspace/ui/lib/request";
|
|
|
|
/** Get document detail GET /v1/public/document/detail */
|
|
export async function queryDocumentDetail(
|
|
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
|
|
params: API.QueryDocumentDetailParams,
|
|
options?: { [key: string]: any }
|
|
) {
|
|
return request<API.Response & { data?: API.Document }>(
|
|
`${import.meta.env.VITE_API_PREFIX}/v1/public/document/detail`,
|
|
{
|
|
method: "GET",
|
|
params: {
|
|
...params,
|
|
},
|
|
...(options || {}),
|
|
}
|
|
);
|
|
}
|
|
|
|
/** Get document list GET /v1/public/document/list */
|
|
export async function queryDocumentList(options?: { [key: string]: any }) {
|
|
return request<API.Response & { data?: API.QueryDocumentListResponse }>(
|
|
`${import.meta.env.VITE_API_PREFIX}/v1/public/document/list`,
|
|
{
|
|
method: "GET",
|
|
...(options || {}),
|
|
}
|
|
);
|
|
}
|