feat: add payout account review flow
This commit is contained in:
@@ -110,7 +110,7 @@ export const CreatorService = {
|
||||
body: { action, reason }
|
||||
});
|
||||
},
|
||||
async listPayoutAccounts({ page, limit, tenant_id, tenant_code, tenant_name, user_id, username, type, created_at_from, created_at_to } = {}) {
|
||||
async listPayoutAccounts({ page, limit, tenant_id, tenant_code, tenant_name, user_id, username, type, status, created_at_from, created_at_to } = {}) {
|
||||
const iso = (d) => {
|
||||
if (!d) return undefined;
|
||||
const date = d instanceof Date ? d : new Date(d);
|
||||
@@ -127,6 +127,7 @@ export const CreatorService = {
|
||||
user_id,
|
||||
username,
|
||||
type,
|
||||
status,
|
||||
created_at_from: iso(created_at_from),
|
||||
created_at_to: iso(created_at_to)
|
||||
};
|
||||
@@ -143,6 +144,16 @@ export const CreatorService = {
|
||||
if (!accountID) throw new Error('accountID is required');
|
||||
return requestJson(`/super/v1/payout-accounts/${accountID}`, { method: 'DELETE' });
|
||||
},
|
||||
async reviewPayoutAccount(accountID, { action, reason } = {}) {
|
||||
if (!accountID) throw new Error('accountID is required');
|
||||
return requestJson(`/super/v1/payout-accounts/${accountID}/review`, {
|
||||
method: 'POST',
|
||||
body: {
|
||||
action,
|
||||
reason
|
||||
}
|
||||
});
|
||||
},
|
||||
async createInvite(tenantID, { max_uses, expires_at, remark } = {}) {
|
||||
if (!tenantID) throw new Error('tenantID is required');
|
||||
return requestJson(`/super/v1/tenants/${tenantID}/invites`, {
|
||||
|
||||
Reference in New Issue
Block a user