♻️ refactor(api): update endpoints to include '/api' prefix and add new types for IP location and withdrawal logs

- Updated all user and common service endpoints to include '/api' prefix for consistency.
- Added new API types for querying IP location and withdrawal logs.
- Introduced commission withdrawal functionality in user service.
- Enhanced user service typings to include rules and withdrawal log structures.
This commit is contained in:
web
2025-11-30 18:20:06 -08:00
parent 1837343845
commit 5f3354e948
35 changed files with 594 additions and 399 deletions
+6 -6
View File
@@ -7,7 +7,7 @@ export async function purchaseCheckout(
options?: { [key: string]: any }
) {
return request<API.Response & { data?: API.CheckoutOrderResponse }>(
"/v1/public/portal/order/checkout",
"/api/v1/public/portal/order/checkout",
{
method: "POST",
headers: {
@@ -26,7 +26,7 @@ export async function queryPurchaseOrder(
options?: { [key: string]: any }
) {
return request<API.Response & { data?: API.QueryPurchaseOrderResponse }>(
"/v1/public/portal/order/status",
"/api/v1/public/portal/order/status",
{
method: "GET",
params: {
@@ -43,7 +43,7 @@ export async function getAvailablePaymentMethods(options?: {
}) {
return request<
API.Response & { data?: API.GetAvailablePaymentMethodsResponse }
>("/v1/public/portal/payment-method", {
>("/api/v1/public/portal/payment-method", {
method: "GET",
...(options || {}),
});
@@ -55,7 +55,7 @@ export async function prePurchaseOrder(
options?: { [key: string]: any }
) {
return request<API.Response & { data?: API.PrePurchaseOrderResponse }>(
"/v1/public/portal/pre",
"/api/v1/public/portal/pre",
{
method: "POST",
headers: {
@@ -73,7 +73,7 @@ export async function purchase(
options?: { [key: string]: any }
) {
return request<API.Response & { data?: API.PortalPurchaseResponse }>(
"/v1/public/portal/purchase",
"/api/v1/public/portal/purchase",
{
method: "POST",
headers: {
@@ -92,7 +92,7 @@ export async function getSubscription(
options?: { [key: string]: any }
) {
return request<API.Response & { data?: API.GetSubscriptionResponse }>(
"/v1/public/portal/subscribe",
"/api/v1/public/portal/subscribe",
{
method: "GET",
params: {