mirror of
https://github.com/fawney19/Aether.git
synced 2026-09-02 09:20:22 +08:00
Fix OAuth token import and table filters
This commit is contained in:
@@ -119,6 +119,7 @@ export interface PoolKeyDetail {
|
||||
oauth_account_user_id?: string | null
|
||||
oauth_account_name?: string | null
|
||||
oauth_organizations?: OAuthOrganizationInfo[] | null
|
||||
oauth_temporary?: boolean | null
|
||||
account_status_code?: string | null // 兼容字段;优先使用 status_snapshot.account
|
||||
account_status_label?: string | null // 兼容字段;优先使用 status_snapshot.account
|
||||
account_status_reason?: string | null // 兼容字段;优先使用 status_snapshot.account
|
||||
@@ -155,6 +156,7 @@ export interface PoolKeyDetail {
|
||||
sticky_sessions: number
|
||||
lru_score: number | null
|
||||
created_at: string | null
|
||||
imported_at?: string | null
|
||||
last_used_at: string | null
|
||||
scheduling_status?: 'available' | 'degraded' | 'blocked'
|
||||
scheduling_reason?:
|
||||
@@ -196,6 +198,8 @@ export interface PoolKeysQuery {
|
||||
status?: 'all' | 'active' | 'cooldown' | 'inactive'
|
||||
quick_selectors?: string[]
|
||||
search_scope?: 'name' | 'full'
|
||||
sort_by?: 'imported_at' | 'last_used_at'
|
||||
sort_order?: 'asc' | 'desc'
|
||||
}
|
||||
|
||||
export interface PoolKeySelectionRequest {
|
||||
|
||||
@@ -17,6 +17,7 @@ export interface ProviderOAuthCompleteResponse {
|
||||
provider_type: string
|
||||
expires_at?: number | null
|
||||
has_refresh_token: boolean
|
||||
temporary?: boolean
|
||||
email?: string | null
|
||||
account_state_recheck_attempted?: boolean
|
||||
account_state_recheck_error?: string | null
|
||||
@@ -27,6 +28,7 @@ export interface ProviderOAuthCompleteResponseWithKey {
|
||||
provider_type: string
|
||||
expires_at?: number | null
|
||||
has_refresh_token: boolean
|
||||
temporary?: boolean
|
||||
email?: string | null
|
||||
replaced?: boolean
|
||||
}
|
||||
@@ -99,7 +101,7 @@ export async function completeProviderLevelOAuth(
|
||||
|
||||
export async function importProviderRefreshToken(
|
||||
providerId: string,
|
||||
data: { refresh_token: string; name?: string; proxy_node_id?: string }
|
||||
data: { refresh_token?: string; access_token?: string; name?: string; proxy_node_id?: string }
|
||||
): Promise<ProviderOAuthCompleteResponseWithKey> {
|
||||
const resp = await client.post(`/api/admin/provider-oauth/providers/${providerId}/import-refresh-token`, data)
|
||||
return resp.data
|
||||
|
||||
@@ -299,6 +299,7 @@ export interface EndpointAPIKey {
|
||||
oauth_account_user_id?: string | null // Codex ChatGPT account-user 联合 ID
|
||||
oauth_account_name?: string | null
|
||||
oauth_organizations?: OAuthOrganizationInfo[] | null // OAuth 关联组织/工作区摘要
|
||||
oauth_temporary?: boolean | null // 是否为仅 Access Token 导入的临时 OAuth 账号
|
||||
oauth_invalid_at?: number | null // 兼容字段;优先使用 status_snapshot.oauth
|
||||
oauth_invalid_reason?: string | null // 兼容字段;优先使用 status_snapshot.oauth
|
||||
status_snapshot?: ProviderKeyStatusSnapshot | null
|
||||
|
||||
@@ -53,6 +53,7 @@ export interface QuotaStatusSnapshot {
|
||||
exhausted: boolean
|
||||
usage_ratio?: number | null
|
||||
updated_at?: number | null
|
||||
reset_at?: number | null
|
||||
reset_seconds?: number | null
|
||||
plan_type?: string | null
|
||||
credits?: QuotaCreditsSnapshot | null
|
||||
|
||||
Reference in New Issue
Block a user