mirror of
https://github.com/router-for-me/Cli-Proxy-API-Management-Center.git
synced 2026-02-18 10:40:50 +08:00
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:
50
src/types/config.ts
Normal file
50
src/types/config.ts
Normal file
@@ -0,0 +1,50 @@
|
||||
/**
|
||||
* 配置相关类型定义
|
||||
* 与基线 /config 返回结构保持一致(内部使用驼峰形式)
|
||||
*/
|
||||
|
||||
import type { GeminiKeyConfig, ProviderKeyConfig, OpenAIProviderConfig } from './provider';
|
||||
|
||||
export interface QuotaExceededConfig {
|
||||
switchProject?: boolean;
|
||||
switchPreviewModel?: boolean;
|
||||
}
|
||||
|
||||
export interface Config {
|
||||
debug?: boolean;
|
||||
proxyUrl?: string;
|
||||
requestRetry?: number;
|
||||
quotaExceeded?: QuotaExceededConfig;
|
||||
usageStatisticsEnabled?: boolean;
|
||||
requestLog?: boolean;
|
||||
loggingToFile?: boolean;
|
||||
wsAuth?: boolean;
|
||||
apiKeys?: string[];
|
||||
geminiApiKeys?: GeminiKeyConfig[];
|
||||
codexApiKeys?: ProviderKeyConfig[];
|
||||
claudeApiKeys?: ProviderKeyConfig[];
|
||||
openaiCompatibility?: OpenAIProviderConfig[];
|
||||
oauthExcludedModels?: Record<string, string[]>;
|
||||
raw?: Record<string, any>;
|
||||
}
|
||||
|
||||
export type RawConfigSection =
|
||||
| 'debug'
|
||||
| 'proxy-url'
|
||||
| 'request-retry'
|
||||
| 'quota-exceeded'
|
||||
| 'usage-statistics-enabled'
|
||||
| 'request-log'
|
||||
| 'logging-to-file'
|
||||
| 'ws-auth'
|
||||
| 'api-keys'
|
||||
| 'gemini-api-key'
|
||||
| 'codex-api-key'
|
||||
| 'claude-api-key'
|
||||
| 'openai-compatibility'
|
||||
| 'oauth-excluded-models';
|
||||
|
||||
export interface ConfigCache {
|
||||
data: Config;
|
||||
timestamp: number;
|
||||
}
|
||||
Reference in New Issue
Block a user