♻️ 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
+15 -12
View File
@@ -6,7 +6,7 @@ export async function updateUserTicketStatus(
body: API.UpdateUserTicketStatusRequest,
options?: { [key: string]: any }
) {
return request<API.Response & { data?: any }>("/v1/public/ticket/", {
return request<API.Response & { data?: any }>("/api/v1/public/ticket/", {
method: "PUT",
headers: {
"Content-Type": "application/json",
@@ -21,7 +21,7 @@ export async function createUserTicket(
body: API.CreateUserTicketRequest,
options?: { [key: string]: any }
) {
return request<API.Response & { data?: any }>("/v1/public/ticket/", {
return request<API.Response & { data?: any }>("/api/v1/public/ticket/", {
method: "POST",
headers: {
"Content-Type": "application/json",
@@ -38,7 +38,7 @@ export async function getUserTicketDetails(
options?: { [key: string]: any }
) {
return request<API.Response & { data?: API.Ticket }>(
"/v1/public/ticket/detail",
"/api/v1/public/ticket/detail",
{
method: "GET",
params: {
@@ -54,14 +54,17 @@ export async function createUserTicketFollow(
body: API.CreateUserTicketFollowRequest,
options?: { [key: string]: any }
) {
return request<API.Response & { data?: any }>("/v1/public/ticket/follow", {
method: "POST",
headers: {
"Content-Type": "application/json",
},
data: body,
...(options || {}),
});
return request<API.Response & { data?: any }>(
"/api/v1/public/ticket/follow",
{
method: "POST",
headers: {
"Content-Type": "application/json",
},
data: body,
...(options || {}),
}
);
}
/** Get ticket list GET /v1/public/ticket/list */
@@ -71,7 +74,7 @@ export async function getUserTicketList(
options?: { [key: string]: any }
) {
return request<API.Response & { data?: API.GetUserTicketListResponse }>(
"/v1/public/ticket/list",
"/api/v1/public/ticket/list",
{
method: "GET",
params: {