feat: add admin order refund action

This commit is contained in:
2026-05-24 09:11:02 -07:00
parent ce6ab4f05b
commit 057cafd9a3
5 changed files with 168 additions and 5 deletions
+18
View File
@@ -78,3 +78,21 @@ export async function activateOrder(
}
);
}
/** Refund order POST /v1/admin/order/refund */
export async function refundOrder(
body: API.RefundOrderRequest,
options?: { [key: string]: any }
) {
return request<API.Response & { data?: any }>(
`${import.meta.env.VITE_API_PREFIX || ""}/v1/admin/order/refund`,
{
method: "POST",
headers: {
"Content-Type": "application/json",
},
data: body,
...(options || {}),
}
);
}
+7
View File
@@ -1423,6 +1423,7 @@ declare namespace API {
fee_amount: number;
trade_no: string;
status: number;
status_name?: string;
subscribe_id: number;
created_at: number;
updated_at: number;
@@ -1446,6 +1447,7 @@ declare namespace API {
fee_amount: number;
trade_no: string;
status: number;
status_name?: string;
subscribe_id: number;
subscribe: Subscribe;
created_at: number;
@@ -2727,6 +2729,11 @@ declare namespace API {
order_no: string;
};
type RefundOrderRequest = {
id: number;
reason?: string;
};
type RedemptionCode = {
id: number;
code: string;