/**
 * @license
 * Copyright 2025 Vybestack LLC
 * SPDX-License-Identifier: Apache-2.0
 */
import { type OAuthToken, type BucketStats } from './types.js';
/**
 * Interface for multi-provider OAuth token storage
 */
export interface TokenStore {
    /**
     * Save an OAuth token for a specific provider
     * @param provider - The provider name (e.g., 'gemini', 'qwen')
     * @param token - The OAuth token to save
     * @param bucket - Optional bucket name for multi-account support
     */
    saveToken(provider: string, token: OAuthToken, bucket?: string): Promise<void>;
    /**
     * Retrieve an OAuth token for a specific provider
     * @param provider - The provider name
     * @param bucket - Optional bucket name for multi-account support
     * @returns The token if found, null otherwise
     */
    getToken(provider: string, bucket?: string): Promise<OAuthToken | null>;
    /**
     * Remove an OAuth token for a specific provider
     * @param provider - The provider name
     * @param bucket - Optional bucket name for multi-account support
     */
    removeToken(provider: string, bucket?: string): Promise<void>;
    /**
     * List all providers that have stored tokens
     * @returns Array of provider names with stored tokens
     */
    listProviders(): Promise<string[]>;
    /**
     * List all buckets for a specific provider
     * @param provider - The provider name
     * @returns Array of bucket names for the provider
     */
    listBuckets(provider: string): Promise<string[]>;
    /**
     * Get usage statistics for a specific bucket
     * @param provider - The provider name
     * @param bucket - The bucket name
     * @returns Bucket statistics if available, null otherwise
     */
    getBucketStats(provider: string, bucket: string): Promise<BucketStats | null>;
}
/**
 * Implementation of multi-provider token storage
 * Stores tokens securely in ~/.llxprt/oauth/ directory
 */
export declare class MultiProviderTokenStore implements TokenStore {
    private readonly basePath;
    constructor(basePath?: string);
    /**
     * Save an OAuth token for a specific provider
     */
    saveToken(provider: string, token: OAuthToken, bucket?: string): Promise<void>;
    /**
     * Retrieve an OAuth token for a specific provider
     */
    getToken(provider: string, bucket?: string): Promise<OAuthToken | null>;
    /**
     * Remove an OAuth token for a specific provider
     */
    removeToken(provider: string, bucket?: string): Promise<void>;
    /**
     * List all providers that have stored tokens
     */
    listProviders(): Promise<string[]>;
    /**
     * List all buckets for a specific provider
     */
    listBuckets(provider: string): Promise<string[]>;
    /**
     * Get usage statistics for a specific bucket
     * Returns placeholder statistics for now
     */
    getBucketStats(provider: string, bucket: string): Promise<BucketStats | null>;
    /**
     * Ensure the OAuth directory exists with secure permissions
     */
    private ensureDirectory;
    /**
     * Generate secure file path for a provider token
     * Uses path.join to prevent path traversal attacks
     */
    private getTokenPath;
    /**
     * Validate bucket name for filesystem safety
     * Rejects characters that could cause issues with file paths
     */
    private validateBucketName;
}
