feat: 实现清理失效账号安全方案(包含预览、SSE测试、安全删除以及本地标记清空)
This commit is contained in:
@@ -330,6 +330,19 @@ export interface OrganizeGroupsItem {
|
||||
message: string
|
||||
}
|
||||
|
||||
export interface CleanupInvalidAccountsItem {
|
||||
account_id: string
|
||||
account_name: string | null
|
||||
upstream_key_id: number | null
|
||||
upstream_name: string | null
|
||||
source_group_name: string | null
|
||||
reason: string
|
||||
test_status: string
|
||||
cleanup_allowed: boolean
|
||||
action_status: string | null
|
||||
message: string
|
||||
}
|
||||
|
||||
export const websitesApi = {
|
||||
list: () => api.get<WebsiteData[]>('/api/websites'),
|
||||
create: (data: WebsiteForm) => api.post<WebsiteData>('/api/websites', data),
|
||||
@@ -357,6 +370,10 @@ export const websitesApi = {
|
||||
}) => api.post<{ success: boolean; message: string; items: ImportAccountItem[] }>(`/api/websites/${id}/accounts/import-upstream-keys`, data),
|
||||
organizeGroups: (id: number) =>
|
||||
api.post<{ success: boolean; message: string; items: OrganizeGroupsItem[] }>(`/api/websites/${id}/groups/organize`),
|
||||
cleanupPreview: (id: number) =>
|
||||
api.post<{ success: boolean; message: string; items: CleanupInvalidAccountsItem[] }>(`/api/websites/${id}/accounts/cleanup-invalid/preview`),
|
||||
cleanupExecute: (id: number) =>
|
||||
api.post<{ success: boolean; message: string; items: CleanupInvalidAccountsItem[] }>(`/api/websites/${id}/accounts/cleanup-invalid/execute`),
|
||||
listBindings: () => api.get<GroupBindingData[]>('/api/group-bindings'),
|
||||
createBinding: (data: GroupBindingForm) => api.post<GroupBindingData>('/api/group-bindings', data),
|
||||
updateBinding: (id: number, data: Partial<GroupBindingForm>) => api.put<GroupBindingData>(`/api/group-bindings/${id}`, data),
|
||||
|
||||
Reference in New Issue
Block a user