♻️ 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
+4 -4
View File
@@ -4,7 +4,7 @@ import request from "@workspace/ui/lib/request";
/** Query revenue statistics GET /v1/admin/console/revenue */
export async function queryRevenueStatistics(options?: { [key: string]: any }) {
return request<API.Response & { data?: API.RevenueStatisticsResponse }>(
"/v1/admin/console/revenue",
"/api/v1/admin/console/revenue",
{
method: "GET",
...(options || {}),
@@ -15,7 +15,7 @@ export async function queryRevenueStatistics(options?: { [key: string]: any }) {
/** Query server total data GET /v1/admin/console/server */
export async function queryServerTotalData(options?: { [key: string]: any }) {
return request<API.Response & { data?: API.ServerTotalDataResponse }>(
"/v1/admin/console/server",
"/api/v1/admin/console/server",
{
method: "GET",
...(options || {}),
@@ -26,7 +26,7 @@ export async function queryServerTotalData(options?: { [key: string]: any }) {
/** Query ticket wait reply GET /v1/admin/console/ticket */
export async function queryTicketWaitReply(options?: { [key: string]: any }) {
return request<API.Response & { data?: API.TicketWaitRelpyResponse }>(
"/v1/admin/console/ticket",
"/api/v1/admin/console/ticket",
{
method: "GET",
...(options || {}),
@@ -37,7 +37,7 @@ export async function queryTicketWaitReply(options?: { [key: string]: any }) {
/** Query user statistics GET /v1/admin/console/user */
export async function queryUserStatistics(options?: { [key: string]: any }) {
return request<API.Response & { data?: API.UserStatisticsResponse }>(
"/v1/admin/console/user",
"/api/v1/admin/console/user",
{
method: "GET",
...(options || {}),