mirror of
https://gitee.com/wanwujie/sub2api
synced 2026-05-05 05:30:44 +08:00
refactor(admin): remove auth migration reports
This commit is contained in:
@@ -6,24 +6,6 @@
|
||||
import { apiClient } from '../client'
|
||||
import type { AdminUser, UpdateUserRequest, PaginatedResponse, ApiKey } from '@/types'
|
||||
|
||||
export interface AuthIdentityMigrationReport {
|
||||
id: number
|
||||
report_type: string
|
||||
report_key: string
|
||||
details: Record<string, unknown>
|
||||
created_at: string
|
||||
resolved_at?: string | null
|
||||
resolved_by_user_id?: number | null
|
||||
resolution_note?: string
|
||||
}
|
||||
|
||||
export interface AuthIdentityMigrationReportSummary {
|
||||
total: number
|
||||
open_total: number
|
||||
resolved_total: number
|
||||
by_type: Record<string, number>
|
||||
}
|
||||
|
||||
export interface AdminBindAuthIdentityChannelRequest {
|
||||
channel: string
|
||||
channel_app_id?: string
|
||||
@@ -48,12 +30,6 @@ export interface AdminBoundAuthIdentity {
|
||||
channel_id?: number | null
|
||||
}
|
||||
|
||||
export interface ListAuthIdentityMigrationReportsParams {
|
||||
page?: number
|
||||
pageSize?: number
|
||||
reportType?: string
|
||||
}
|
||||
|
||||
/**
|
||||
* List all users with pagination
|
||||
* @param page - Page number (default: 1)
|
||||
@@ -296,42 +272,6 @@ export async function replaceGroup(
|
||||
return data
|
||||
}
|
||||
|
||||
export async function getAuthIdentityMigrationReportSummary(): Promise<AuthIdentityMigrationReportSummary> {
|
||||
const { data } = await apiClient.get<AuthIdentityMigrationReportSummary>(
|
||||
'/admin/users/auth-identity-migration-reports/summary'
|
||||
)
|
||||
return data
|
||||
}
|
||||
|
||||
export async function listAuthIdentityMigrationReports(
|
||||
params: ListAuthIdentityMigrationReportsParams = {}
|
||||
): Promise<PaginatedResponse<AuthIdentityMigrationReport>> {
|
||||
const { data } = await apiClient.get<PaginatedResponse<AuthIdentityMigrationReport>>(
|
||||
'/admin/users/auth-identity-migration-reports',
|
||||
{
|
||||
params: {
|
||||
page: params.page ?? 1,
|
||||
page_size: params.pageSize ?? 20,
|
||||
report_type: params.reportType ?? ''
|
||||
}
|
||||
}
|
||||
)
|
||||
return data
|
||||
}
|
||||
|
||||
export async function resolveAuthIdentityMigrationReport(
|
||||
id: number,
|
||||
resolutionNote: string
|
||||
): Promise<AuthIdentityMigrationReport> {
|
||||
const { data } = await apiClient.post<AuthIdentityMigrationReport>(
|
||||
`/admin/users/auth-identity-migration-reports/${id}/resolve`,
|
||||
{
|
||||
resolution_note: resolutionNote
|
||||
}
|
||||
)
|
||||
return data
|
||||
}
|
||||
|
||||
export async function bindUserAuthIdentity(
|
||||
userId: number,
|
||||
input: AdminBindAuthIdentityRequest
|
||||
@@ -356,10 +296,7 @@ export const usersAPI = {
|
||||
getUserUsageStats,
|
||||
getUserBalanceHistory,
|
||||
replaceGroup,
|
||||
bindUserAuthIdentity,
|
||||
getAuthIdentityMigrationReportSummary,
|
||||
listAuthIdentityMigrationReports,
|
||||
resolveAuthIdentityMigrationReport
|
||||
bindUserAuthIdentity
|
||||
}
|
||||
|
||||
export default usersAPI
|
||||
|
||||
Reference in New Issue
Block a user