feat(admin): add configurable S3 backups

This commit is contained in:
Kayphoon
2026-05-26 14:41:56 +08:00
parent c4927162b7
commit 84c8bc960e
26 changed files with 4426 additions and 5 deletions
+20
View File
@@ -106,6 +106,18 @@ export interface AggregateExportData {
user_data: UsersExportData
}
export type S3BackupScope = 'config' | 'users' | 'data'
export interface S3BackupRunResponse {
message: string
task: {
id: string
task_key: string
status: string
progress_message?: string
}
}
export interface UserGroupExport {
id?: string
name: string
@@ -1043,6 +1055,14 @@ export const adminApi = {
return response.data
},
// 立即执行 S3 备份
async runS3Backup(): Promise<S3BackupRunResponse> {
const response = await apiClient.post<S3BackupRunResponse>(
'/api/admin/system/backups/s3/run'
)
return response.data
},
// 查询 Provider 可用模型(从上游 API 获取)
async queryProviderModels(providerId: string, apiKeyId?: string, forceRefresh = false): Promise<ProviderModelsQueryResponse> {
const response = await apiClient.post<ProviderModelsQueryResponse>(