/**
 * Anthropic OAuth 2.0 Device Flow Implementation
 *
 * Implements OAuth 2.0 device authorization grant flow for Anthropic Claude API.
 * Based on the OAuth 2.0 Device Authorization Grant specification (RFC 8628).
 */
import { type DeviceCodeResponse, type OAuthToken } from './types.js';
/**
 * Configuration for Anthropic device flow authentication
 */
interface AnthropicFlowConfig {
    clientId: string;
    authorizationEndpoint: string;
    tokenEndpoint: string;
    scopes: string[];
}
/**
 * Anthropic-specific OAuth 2.0 device flow implementation.
 * Handles authentication for Claude API access.
 */
export declare class AnthropicDeviceFlow {
    private config;
    private codeVerifier?;
    private _codeChallenge?;
    private state?;
    private redirectUri;
    constructor(config?: Partial<AnthropicFlowConfig>);
    /**
     * Generates PKCE code verifier and challenge using S256 method
     */
    private generatePKCE;
    /**
     * Initiates the OAuth flow by constructing the authorization URL.
     * Since Anthropic doesn't have a device flow, we simulate it with authorization code flow.
     */
    initiateDeviceFlow(redirectUri?: string): Promise<DeviceCodeResponse>;
    /**
     * Exchange authorization code for access token (PKCE flow)
     */
    exchangeCodeForToken(authCodeWithState: string): Promise<OAuthToken>;
    getState(): string;
    buildAuthorizationUrl(redirectUri: string): string;
    /**
     * Polls for the access token after user authorization.
     */
    pollForToken(deviceCode: string): Promise<OAuthToken>;
    /**
     * Refreshes an expired access token using a refresh token.
     */
    refreshToken(refreshToken: string): Promise<OAuthToken>;
    /**
     * Maps Anthropic's token response to our standard OAuthToken format.
     */
    private mapTokenResponse;
}
export {};
