feat: add system test validation and router admin controls
This commit is contained in:
@@ -2,6 +2,8 @@ import type {
|
||||
AdminDashboardSummary,
|
||||
AdminServiceRestartAction,
|
||||
AdminServiceRestartResult,
|
||||
AdminSystemTestReport,
|
||||
AdminSystemTestAccount,
|
||||
AdminSubscription,
|
||||
AdminUserRow,
|
||||
AuthStatus,
|
||||
@@ -310,6 +312,41 @@ export async function listMemoryV2ModelOptions(): Promise<{
|
||||
};
|
||||
}
|
||||
|
||||
export async function runSystemSkillValidation(payload: {
|
||||
accountId?: string;
|
||||
username: string;
|
||||
password: string;
|
||||
skillName: string;
|
||||
}): Promise<AdminSystemTestReport> {
|
||||
return portalFetch('/admin-api/system-tests/skill-validation', {
|
||||
method: 'POST',
|
||||
body: JSON.stringify(payload),
|
||||
});
|
||||
}
|
||||
|
||||
export async function listSystemTestAccounts(): Promise<AdminSystemTestAccount[]> {
|
||||
const result = await portalFetch<{ accounts: AdminSystemTestAccount[] }>('/admin-api/system-tests/accounts');
|
||||
return result.accounts ?? [];
|
||||
}
|
||||
|
||||
export async function createSystemTestAccount(payload: {
|
||||
label?: string;
|
||||
username: string;
|
||||
password: string;
|
||||
}): Promise<AdminSystemTestAccount> {
|
||||
const result = await portalFetch<{ account: AdminSystemTestAccount }>('/admin-api/system-tests/accounts', {
|
||||
method: 'POST',
|
||||
body: JSON.stringify(payload),
|
||||
});
|
||||
return result.account;
|
||||
}
|
||||
|
||||
export async function deleteSystemTestAccount(accountId: string): Promise<void> {
|
||||
await portalFetch(`/admin-api/system-tests/accounts/${encodeURIComponent(accountId)}`, {
|
||||
method: 'DELETE',
|
||||
});
|
||||
}
|
||||
|
||||
export async function listWechatBindings(params?: {
|
||||
search?: string;
|
||||
limit?: number;
|
||||
|
||||
Reference in New Issue
Block a user