import { PKCECodes } from './pkce'; import { OAuthTokenStorage } from './store'; /** * Codex (Sign in with ChatGPT) OAuth flow — port từ CLIProxyAPI * `internal/auth/codex/openai_auth.go`. * * Constants giống Codex CLI để OpenAI nhận diện là Codex CLI. */ export declare const CODEX_AUTH_URL = "https://auth.openai.com/oauth/authorize"; export declare const CODEX_TOKEN_URL = "https://auth.openai.com/oauth/token"; export declare const CODEX_CLIENT_ID = "app_EMoamEEZ73f0CkXaXp7hrann"; export declare const CODEX_REDIRECT_URI = "http://localhost:1455/auth/callback"; export declare const CODEX_SCOPE = "openid email profile offline_access"; export interface CodexAuthSession { authUrl: string; state: string; pkce: PKCECodes; } export declare function startCodexAuth(): CodexAuthSession; export declare function exchangeCodexCodeForTokens(code: string, pkce: PKCECodes, account?: string): Promise; export declare function refreshCodexToken(current: OAuthTokenStorage): Promise;