UNPKG

@kdump/code-cli-any-llm

Version:

> A unified gateway for the Gemini, opencode, crush, and Qwen Code AI CLIs

42 lines (41 loc) 1.14 kB
import { Logger } from '@nestjs/common'; interface AuthHeaders { authorization: string; accountId?: string; } export declare class ChatGPTAuthManager { private readonly logger; private tokens?; private inflight?; private readonly codexHome; private readonly authFile; private readonly issuer; private readonly clientId; constructor(logger: Logger, options?: { codexHome?: string; issuer?: string; clientId?: string; }); getAuthHeaders(): Promise<AuthHeaders>; private ensureTokens; private loadOrRefreshTokens; private isExpiring; private readTokensFromDisk; private writeTokens; refreshAuthTokens(): Promise<void>; private refreshTokensInternal; private loginFlow; private startAuthServer; private sendCancelRequest; private exchangeCodeForTokens; private obtainApiKey; private buildAuthorizeUrl; private createPkceCodes; private generateState; private generateRandomString; private toBase64Url; private extractAccountId; private isAuthFileSchema; private buildUserAgent; } export {};