mirror of
https://github.com/perfect-panel/ppanel-web.git
synced 2026-02-15 04:41:10 -05:00
- Added language, languageDescription, and languagePlaceholder fields to product.json for multiple locales (ja-JP, ko-KR, no-NO, pl-PL, pt-BR, ro-RO, ru-RU, th-TH, tr-TR, uk-UA, vi-VN, zh-HK). - Removed group-related fields from product.json for cleaner structure. - Updated API calls in user services to include language parameter for subscription retrieval. - Enhanced type definitions for subscription requests to accommodate language parameter.
99 lines
2.6 KiB
TypeScript
99 lines
2.6 KiB
TypeScript
// @ts-ignore
|
|
/* eslint-disable */
|
|
import request from '@/utils/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 }>(
|
|
'/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 }>(
|
|
'/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 }>(
|
|
'/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 }>('/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 }>(
|
|
'/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 }>(
|
|
'/v1/public/portal/subscribe',
|
|
{
|
|
method: 'GET',
|
|
params: {
|
|
...params,
|
|
},
|
|
...(options || {}),
|
|
},
|
|
);
|
|
}
|