mirror of
https://github.com/fawney19/Aether.git
synced 2026-09-12 14:10:19 +08:00
feat(admin): add configurable S3 backups
This commit is contained in:
@@ -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>(
|
||||
|
||||
Reference in New Issue
Block a user