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

106 lines
2.6 KiB
TypeScript

//
/* eslint-disable */
import request from "@workspace/ui/lib/request";
/** Purchase Checkout POST /v1/public/portal/order/checkout */
export async function purchaseCheckout(
body: API.CheckoutOrderRequest,
options?: { [key: string]: any }
) {
return request<API.Response & { data?: API.CheckoutOrderResponse }>(
"/api/v1/public/portal/order/checkout",
{
method: "POST",
headers: {
"Content-Type": "application/json",
},
data: body,
...(options || {}),
}
);
}
/** Query Purchase Order GET /v1/public/portal/order/status */
export async function queryPurchaseOrder(
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
params: API.QueryPurchaseOrderParams,
options?: { [key: string]: any }
) {
return request<API.Response & { data?: API.QueryPurchaseOrderResponse }>(
"/api/v1/public/portal/order/status",
{
method: "GET",
params: {
...params,
},
...(options || {}),
}
);
}
/** Get available payment methods GET /v1/public/portal/payment-method */
export async function getAvailablePaymentMethods(options?: {
[key: string]: any;
}) {
return request<
API.Response & { data?: API.GetAvailablePaymentMethodsResponse }
>("/api/v1/public/portal/payment-method", {
method: "GET",
...(options || {}),
});
}
/** Pre Purchase Order POST /v1/public/portal/pre */
export async function prePurchaseOrder(
body: API.PrePurchaseOrderRequest,
options?: { [key: string]: any }
) {
return request<API.Response & { data?: API.PrePurchaseOrderResponse }>(
"/api/v1/public/portal/pre",
{
method: "POST",
headers: {
"Content-Type": "application/json",
},
data: body,
...(options || {}),
}
);
}
/** Purchase subscription POST /v1/public/portal/purchase */
export async function purchase(
body: API.PortalPurchaseRequest,
options?: { [key: string]: any }
) {
return request<API.Response & { data?: API.PortalPurchaseResponse }>(
"/api/v1/public/portal/purchase",
{
method: "POST",
headers: {
"Content-Type": "application/json",
},
data: body,
...(options || {}),
}
);
}
/** Get Subscription GET /v1/public/portal/subscribe */
export async function getSubscription(
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
params: API.GetSubscriptionParams,
options?: { [key: string]: any }
) {
return request<API.Response & { data?: API.GetSubscriptionResponse }>(
"/api/v1/public/portal/subscribe",
{
method: "GET",
params: {
...params,
},
...(options || {}),
}
);
}