feat: add withdrawal management pages
Build and Release / Build (push) Has been cancelled
Issue Close Require / issue-close-require (push) Has been cancelled

This commit is contained in:
2026-05-24 20:30:19 -07:00
parent 65641838f9
commit 11c3ce26a6
7 changed files with 361 additions and 245 deletions
+2
View File
@@ -22,6 +22,7 @@ import * as system from "./system";
import * as ticket from "./ticket";
import * as tool from "./tool";
import * as user from "./user";
import * as withdrawal from "./withdrawal";
export default {
ads,
announcement,
@@ -43,4 +44,5 @@ export default {
ticket,
tool,
user,
withdrawal,
};
+32
View File
@@ -28,6 +28,21 @@ declare namespace API {
updated_at: number;
};
type AdminWithdrawalLog = {
id: number;
user_id: number;
amount: number;
content: string;
status: number;
reason?: string;
created_at: number;
updated_at: number;
};
type ApproveWithdrawalRequest = {
withdrawal_id: number;
};
type AnyTLS = {
port: number;
security_config: SecurityConfig;
@@ -71,6 +86,18 @@ declare namespace API {
is_default: boolean;
};
type GetWithdrawalListParams = {
page: number;
size: number;
user_id?: number;
status?: number;
};
type GetWithdrawalListResponse = {
list: AdminWithdrawalLog[];
total: number;
};
type AppUserSubcbribe = {
id: number;
name: string;
@@ -3075,6 +3102,11 @@ declare namespace API {
confirm: boolean;
};
type RejectWithdrawalRequest = {
withdrawal_id: number;
reason: string;
};
type PreviewUserNodesRequest = {
user_id: number;
};
+8
View File
@@ -846,6 +846,14 @@ declare namespace API {
order_no: string;
};
type RedeemCodeRequest = {
code: string;
};
type RedeemCodeResponse = {
message: string;
};
type RegisterConfig = {
stop_register: boolean;
enable_trial: boolean;
+18
View File
@@ -251,6 +251,24 @@ export async function updateUserPassword(
);
}
/** Redeem Code POST /v1/public/redemption/ */
export async function redeemCode(
body: API.RedeemCodeRequest,
options?: { [key: string]: any }
) {
return request<API.Response & { data?: API.RedeemCodeResponse }>(
`${import.meta.env.VITE_API_PREFIX || ""}/v1/public/redemption/`,
{
method: "POST",
headers: {
"Content-Type": "application/json",
},
data: body,
...(options || {}),
}
);
}
/** Update User Rules PUT /v1/public/user/rules */
export async function updateUserRules(
body: API.UpdateUserRulesRequest,