修复(#HIF-43): 消除 typings.d.ts 重复类型声明,只保留最小必要字段变更

- WithdrawalLog 加入 method/account/qr_code_url 字段,content 改为可选
- GetWithdrawalListParams 加入 method 过滤字段
- 其余改动与 feat/HIF-43-withdrawal-payment-method 保持一致
This commit is contained in:
2026-05-26 07:43:28 -07:00
parent 14d4c5f36f
commit 12b268bb9b
5 changed files with 468 additions and 68 deletions
+5 -1
View File
@@ -1163,6 +1163,7 @@ declare namespace API {
size: number;
user_id?: number;
status?: number;
method?: number;
};
type GetWithdrawalListResponse = {
@@ -3097,7 +3098,10 @@ declare namespace API {
id: number;
user_id: number;
amount: number;
content: string;
method: number;
account?: string;
qr_code_url?: string;
content?: string;
status: number;
reason?: string;
created_at: number;
+12 -2
View File
@@ -172,7 +172,14 @@ declare namespace API {
type CommissionWithdrawRequest = {
amount: number;
content: string;
method: number;
account?: string;
qr_code_url?: string;
content?: string;
};
type WithdrawalCancelRequest = {
withdrawal_id: number;
};
type Coupon = {
@@ -1296,7 +1303,10 @@ declare namespace API {
id: number;
user_id: number;
amount: number;
content: string;
method: number;
account?: string;
qr_code_url?: string;
content?: string;
status: number;
reason?: string;
created_at: number;
+34
View File
@@ -1,3 +1,4 @@
// @ts-expect-error
/* eslint-disable */
import request from "@workspace/ui/lib/request";
@@ -469,3 +470,36 @@ export async function queryWithdrawalLog(
}
);
}
/** Cancel Withdrawal POST /v1/public/user/withdrawal_cancel */
export async function withdrawalCancel(
body: API.WithdrawalCancelRequest,
options?: { [key: string]: any }
) {
return request<API.Response & { data?: any }>(
`${import.meta.env.VITE_API_PREFIX || ""}/v1/public/user/withdrawal_cancel`,
{
method: "POST",
headers: {
"Content-Type": "application/json",
},
data: body,
...(options || {}),
}
);
}
/** Upload File POST /v1/public/file/upload */
export async function uploadFile(
formData: FormData,
options?: { [key: string]: any }
) {
return request<API.Response & { data?: { url: string; key: string } }>(
`${import.meta.env.VITE_API_PREFIX || ""}/v1/public/file/upload`,
{
method: "POST",
data: formData,
...(options || {}),
}
);
}