/**
 * GitHub Source
 *
 * Fetches plugin information from GitHub releases using API v3
 * API Docs: https://docs.github.com/en/rest
 */
import type { PluginInfo, SourceType } from '../types/index.js';
import { BasePluginSource } from './base.js';
/**
 * Rate limit state tracking
 */
interface RateLimitState {
    remaining: number;
    limit: number;
    resetAt: Date;
}
/**
 * GitHubSource implementation
 */
export declare class GitHubSource extends BasePluginSource {
    readonly id = "github";
    readonly name = "GitHub Releases";
    readonly type: SourceType;
    private static readonly API_BASE;
    private static readonly RATE_LIMIT_BUFFER;
    private apiToken;
    private rateLimit;
    /**
     * Set GitHub API token for higher rate limits
     */
    setApiToken(token: string): void;
    /**
     * Get current rate limit state
     */
    getRateLimitState(): RateLimitState | null;
    /**
     * Check if we should wait due to rate limits
     */
    private shouldWaitForRateLimit;
    /**
     * Get wait time in milliseconds until rate limit resets
     */
    private getRateLimitWaitTime;
    /**
     * Update rate limit state from response headers
     */
    private updateRateLimitFromHeaders;
    /**
     * Get plugin info by repo slug (owner/repo)
     */
    getPluginInfo(repoSlug: string): Promise<PluginInfo | null>;
    /**
     * Search for plugins (searches repositories with 'minecraft-plugin' topic)
     */
    searchPlugins(query: string, limit?: number): Promise<PluginInfo[]>;
    /**
     * Get latest version for a repository
     */
    getLatestVersion(repoSlug: string): Promise<string | null>;
    /**
     * Get the latest release for a repository
     */
    private getLatestRelease;
    /**
     * Get all releases for a repository
     */
    getAllReleases(repoSlug: string, limit?: number): Promise<PluginInfo[]>;
    /**
     * Override headers to include GitHub-specific headers
     */
    protected buildHeaders(additional?: Record<string, string>): Record<string, string>;
    /**
     * Fetch JSON with rate limit tracking
     */
    private fetchJsonWithRateLimit;
    /**
     * Parse GitHub release into PluginInfo
     */
    private parseRelease;
    /**
     * Find the best JAR asset from a release
     * Only returns non-sources, non-javadoc JARs to avoid downloading wrong artifacts
     */
    private findJarAsset;
    /**
     * Clean version string (remove 'v' prefix, etc.)
     */
    private cleanVersion;
}
export {};
//# sourceMappingURL=github.d.ts.map