8d0ddbb5ef
- 补充 RefObject import(local-captcha、slider-captcha、node-group-form) - 删除 slider-captcha 中无用的 _scaleX/_scaleY 变量 - user_subscribe_id 类型转换 number → string - 移除 services 文件中失效的 @ts-expect-error 指令
93 lines
2.4 KiB
TypeScript
93 lines
2.4 KiB
TypeScript
/* eslint-disable */
|
|
import request from "@workspace/ui/lib/request";
|
|
|
|
/** Update announcement PUT /v1/admin/announcement/ */
|
|
export async function updateAnnouncement(
|
|
body: API.UpdateAnnouncementRequest,
|
|
options?: { [key: string]: any }
|
|
) {
|
|
return request<API.Response & { data?: any }>(
|
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/admin/announcement/`,
|
|
{
|
|
method: "PUT",
|
|
headers: {
|
|
"Content-Type": "application/json",
|
|
},
|
|
data: body,
|
|
...(options || {}),
|
|
}
|
|
);
|
|
}
|
|
|
|
/** Create announcement POST /v1/admin/announcement/ */
|
|
export async function createAnnouncement(
|
|
body: API.CreateAnnouncementRequest,
|
|
options?: { [key: string]: any }
|
|
) {
|
|
return request<API.Response & { data?: any }>(
|
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/admin/announcement/`,
|
|
{
|
|
method: "POST",
|
|
headers: {
|
|
"Content-Type": "application/json",
|
|
},
|
|
data: body,
|
|
...(options || {}),
|
|
}
|
|
);
|
|
}
|
|
|
|
/** Delete announcement DELETE /v1/admin/announcement/ */
|
|
export async function deleteAnnouncement(
|
|
body: API.DeleteAnnouncementRequest,
|
|
options?: { [key: string]: any }
|
|
) {
|
|
return request<API.Response & { data?: any }>(
|
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/admin/announcement/`,
|
|
{
|
|
method: "DELETE",
|
|
headers: {
|
|
"Content-Type": "application/json",
|
|
},
|
|
data: body,
|
|
...(options || {}),
|
|
}
|
|
);
|
|
}
|
|
|
|
/** Get announcement GET /v1/admin/announcement/detail */
|
|
export async function getAnnouncement(
|
|
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
|
|
params: API.GetAnnouncementParams,
|
|
options?: { [key: string]: any }
|
|
) {
|
|
return request<API.Response & { data?: API.Announcement }>(
|
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/admin/announcement/detail`,
|
|
{
|
|
method: "GET",
|
|
params: {
|
|
...params,
|
|
},
|
|
...(options || {}),
|
|
}
|
|
);
|
|
}
|
|
|
|
/** Get announcement list GET /v1/admin/announcement/list */
|
|
export async function getAnnouncementList(
|
|
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
|
|
params: API.GetAnnouncementListParams,
|
|
options?: { [key: string]: any }
|
|
) {
|
|
return request<API.Response & { data?: API.GetAnnouncementListResponse }>(
|
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/admin/announcement/list`,
|
|
{
|
|
method: "GET",
|
|
params: {
|
|
...params,
|
|
},
|
|
...(options || {}),
|
|
}
|
|
);
|
|
}
|