import open from 'open'; import { AuthRequestResponse, TokenExchangeResponse, TokenVerifyResponse } from '../models/auth.js'; import { TokenStore } from './token-store.js'; /** * Service that manages authentication flows and token operations */ export declare class AuthService { private readonly cliApi; private readonly openBrowserFn; private readonly tokenStore; constructor(tokenStore?: TokenStore, openBrowserFn?: typeof open); /** * Deletes the user token */ deleteToken(): Promise; /** * Checks if the user is authenticated and returns verification details if valid. * @returns {Promise} Verification response object if token is valid, otherwise false. */ isAuthenticated(): Promise; /** * Opens the browser to the authentication URL */ openBrowser(url: string): Promise; /** * Polls the server until authentication completes or times out */ pollForTokenExchange(authCode: string, maxAttempts?: number, interval?: number): Promise; /** * Requests an authentication URL and code from the server */ requestAuthToken(): Promise; /** * Revokes the current token */ revokeToken(): Promise; /** * Stores the user authentication token */ storeUserToken(token: string): Promise; /** * Verifies if the current token is valid */ verifyToken(): Promise; }