mirror of
https://github.com/router-for-me/Cli-Proxy-API-Management-Center.git
synced 2026-02-03 03:10:50 +08:00
29 lines
606 B
TypeScript
29 lines
606 B
TypeScript
/**
|
|
* 认证相关类型定义
|
|
* 基于原项目 src/modules/login.js 和 src/core/connection.js
|
|
*/
|
|
|
|
// 登录凭据
|
|
export interface LoginCredentials {
|
|
apiBase: string;
|
|
managementKey: string;
|
|
}
|
|
|
|
// 认证状态
|
|
export interface AuthState {
|
|
isAuthenticated: boolean;
|
|
apiBase: string;
|
|
managementKey: string;
|
|
serverVersion: string | null;
|
|
serverBuildDate: string | null;
|
|
}
|
|
|
|
// 连接状态
|
|
export type ConnectionStatus = 'connected' | 'disconnected' | 'connecting' | 'error';
|
|
|
|
export interface ConnectionInfo {
|
|
status: ConnectionStatus;
|
|
lastCheck: Date | null;
|
|
error: string | null;
|
|
}
|