56 lines
1.4 KiB
TypeScript
56 lines
1.4 KiB
TypeScript
/* eslint-disable */
|
|
import request from "@workspace/ui/lib/request";
|
|
|
|
/** Get withdrawal list GET /v1/admin/user/withdrawal/list */
|
|
export async function getWithdrawalList(
|
|
params: API.GetWithdrawalListParams,
|
|
options?: { [key: string]: any }
|
|
) {
|
|
return request<API.Response & { data?: API.GetWithdrawalListResponse }>(
|
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/admin/user/withdrawal/list`,
|
|
{
|
|
method: "GET",
|
|
params: {
|
|
...params,
|
|
},
|
|
...(options || {}),
|
|
}
|
|
);
|
|
}
|
|
|
|
/** Approve withdrawal POST /v1/admin/user/withdrawal/approve */
|
|
export async function approveWithdrawal(
|
|
body: API.ApproveWithdrawalRequest,
|
|
options?: { [key: string]: any }
|
|
) {
|
|
return request<API.Response & { data?: any }>(
|
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/admin/user/withdrawal/approve`,
|
|
{
|
|
method: "POST",
|
|
headers: {
|
|
"Content-Type": "application/json",
|
|
},
|
|
data: body,
|
|
...(options || {}),
|
|
}
|
|
);
|
|
}
|
|
|
|
/** Reject withdrawal POST /v1/admin/user/withdrawal/reject */
|
|
export async function rejectWithdrawal(
|
|
body: API.RejectWithdrawalRequest,
|
|
options?: { [key: string]: any }
|
|
) {
|
|
return request<API.Response & { data?: any }>(
|
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/admin/user/withdrawal/reject`,
|
|
{
|
|
method: "POST",
|
|
headers: {
|
|
"Content-Type": "application/json",
|
|
},
|
|
data: body,
|
|
...(options || {}),
|
|
}
|
|
);
|
|
}
|