feat: initialize new React application structure with TypeScript, ESLint, and Prettier configurations, while removing legacy files and adding new components and pages for enhanced functionality

This commit is contained in:
Supra4E8C
2025-12-07 11:32:31 +08:00
parent 8e4132200d
commit 450964fb1a
144 changed files with 14223 additions and 21647 deletions

View File

@@ -0,0 +1,29 @@
/**
* 认证文件与 OAuth 排除模型相关 API
*/
import { apiClient } from './client';
import type { AuthFilesResponse } from '@/types/authFile';
export const authFilesApi = {
list: () => apiClient.get<AuthFilesResponse>('/auth-files'),
upload: (file: File) => {
const formData = new FormData();
formData.append('file', file, file.name);
return apiClient.postForm('/auth-files', formData);
},
deleteFile: (name: string) => apiClient.delete(`/auth-files?name=${encodeURIComponent(name)}`),
deleteAll: () => apiClient.delete('/auth-files', { params: { all: true } }),
// OAuth 排除模型
getOauthExcludedModels: () => apiClient.get('/oauth-excluded-models'),
saveOauthExcludedModels: (provider: string, models: string[]) =>
apiClient.patch('/oauth-excluded-models', { provider, models }),
deleteOauthExcludedEntry: (provider: string) =>
apiClient.delete(`/oauth-excluded-models?provider=${encodeURIComponent(provider)}`)
};