web 3cf6a5cfb4 feat: update localization files and improve system version management
- Changed output path for i18next configuration in admin and user apps to "public/assets/locales/{{language}}/{{namespace}}.json".
- Added new translation keys in English and Chinese for admin and user updates in tool.json files.
- Refactored SystemVersionCard component to utilize new service version checking and updating logic.
- Introduced basic service version checking and updating functions in the gateway service.
- Added typings for new API endpoints related to service version management.
- Updated Vite configuration to rewrite API paths.
- Added TypeScript error handling in various service files.
2025-12-01 03:00:47 -08:00

82 lines
2.0 KiB
TypeScript

//
/* eslint-disable */
import request from "@workspace/ui/lib/request";
/** Update coupon PUT /v1/admin/coupon/ */
export async function updateCoupon(
body: API.UpdateCouponRequest,
options?: { [key: string]: any }
) {
return request<API.Response & { data?: any }>("/api/v1/admin/coupon/", {
method: "PUT",
headers: {
"Content-Type": "application/json",
},
data: body,
...(options || {}),
});
}
/** Create coupon POST /v1/admin/coupon/ */
export async function createCoupon(
body: API.CreateCouponRequest,
options?: { [key: string]: any }
) {
return request<API.Response & { data?: any }>("/api/v1/admin/coupon/", {
method: "POST",
headers: {
"Content-Type": "application/json",
},
data: body,
...(options || {}),
});
}
/** Delete coupon DELETE /v1/admin/coupon/ */
export async function deleteCoupon(
body: API.DeleteCouponRequest,
options?: { [key: string]: any }
) {
return request<API.Response & { data?: any }>("/api/v1/admin/coupon/", {
method: "DELETE",
headers: {
"Content-Type": "application/json",
},
data: body,
...(options || {}),
});
}
/** Batch delete coupon DELETE /v1/admin/coupon/batch */
export async function batchDeleteCoupon(
body: API.BatchDeleteCouponRequest,
options?: { [key: string]: any }
) {
return request<API.Response & { data?: any }>("/api/v1/admin/coupon/batch", {
method: "DELETE",
headers: {
"Content-Type": "application/json",
},
data: body,
...(options || {}),
});
}
/** Get coupon list GET /v1/admin/coupon/list */
export async function getCouponList(
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
params: API.GetCouponListParams,
options?: { [key: string]: any }
) {
return request<API.Response & { data?: API.GetCouponListResponse }>(
"/api/v1/admin/coupon/list",
{
method: "GET",
params: {
...params,
},
...(options || {}),
}
);
}