feat: add order governance flags and reconciliation

This commit is contained in:
2026-01-16 13:29:59 +08:00
parent 7ead7fc11c
commit e5f40287c3
17 changed files with 1247 additions and 103 deletions

View File

@@ -20,6 +20,8 @@ export const OrderService = {
content_title,
type,
status,
is_flagged,
is_reconciled,
created_at_from,
created_at_to,
paid_at_from,
@@ -49,6 +51,8 @@ export const OrderService = {
content_title,
type,
status,
is_flagged,
is_reconciled,
created_at_from: iso(created_at_from),
created_at_to: iso(created_at_to),
paid_at_from: iso(paid_at_from),
@@ -86,5 +90,25 @@ export const OrderService = {
idempotency_key
}
});
},
async flagOrder(orderID, { is_flagged, reason } = {}) {
if (!orderID) throw new Error('orderID is required');
return requestJson(`/super/v1/orders/${orderID}/flag`, {
method: 'POST',
body: {
is_flagged: Boolean(is_flagged),
reason
}
});
},
async reconcileOrder(orderID, { is_reconciled, note } = {}) {
if (!orderID) throw new Error('orderID is required');
return requestJson(`/super/v1/orders/${orderID}/reconcile`, {
method: 'POST',
body: {
is_reconciled: Boolean(is_reconciled),
note
}
});
}
};