feat: add withdrawal management pages
This commit is contained in:
@@ -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
@@ -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
@@ -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;
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user