♻️ 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
+21 -3
View File
@@ -1,10 +1,28 @@
/* eslint-disable */
import request from "@workspace/ui/lib/request";
/** Query IP Location GET /v1/admin/tool/ip/location */
export async function queryIpLocation(
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
params: API.QueryIPLocationParams,
options?: { [key: string]: any }
) {
return request<API.Response & { data?: API.QueryIPLocationResponse }>(
"/api/v1/admin/tool/ip/location",
{
method: "GET",
params: {
...params,
},
...(options || {}),
}
);
}
/** Get System Log GET /v1/admin/tool/log */
export async function getSystemLog(options?: { [key: string]: any }) {
return request<API.Response & { data?: API.LogResponse }>(
"/v1/admin/tool/log",
"/api/v1/admin/tool/log",
{
method: "GET",
...(options || {}),
@@ -14,7 +32,7 @@ export async function getSystemLog(options?: { [key: string]: any }) {
/** Restart System GET /v1/admin/tool/restart */
export async function restartSystem(options?: { [key: string]: any }) {
return request<API.Response & { data?: any }>("/v1/admin/tool/restart", {
return request<API.Response & { data?: any }>("/api/v1/admin/tool/restart", {
method: "GET",
...(options || {}),
});
@@ -23,7 +41,7 @@ export async function restartSystem(options?: { [key: string]: any }) {
/** Get Version GET /v1/admin/tool/version */
export async function getVersion(options?: { [key: string]: any }) {
return request<API.Response & { data?: API.VersionResponse }>(
"/v1/admin/tool/version",
"/api/v1/admin/tool/version",
{
method: "GET",
...(options || {}),