/**
 * Plugin Registry Type Definitions
 *
 * Types for the curated plugin registry system
 */
import type { PluginSourceType } from '../types/plugin.js';
/**
 * Plugin category for organization
 */
export type PluginCategory = 'admin' | 'economy' | 'permissions' | 'world' | 'gameplay' | 'chat' | 'protection' | 'utility' | 'library' | 'performance' | 'cosmetic' | 'minigames' | 'social';
/**
 * Source configuration for a registry plugin
 */
export interface RegistryPluginSource {
    /** Source type */
    type: PluginSourceType;
    /** Modrinth project slug */
    projectSlug?: string;
    /** Hangar project slug (often same as project name) */
    hangarSlug?: string;
    /** Spigot resource ID */
    resourceId?: number;
    /** CurseForge project ID */
    curseforgeId?: string;
    /** GitHub repo in owner/repo format */
    repoSlug?: string;
    /** Jenkins job name */
    jenkinsJob?: string;
    /** Jenkins base URL */
    jenkinsUrl?: string;
    /** Mark as preferred source for this plugin */
    preferred?: boolean;
    /** Release channel preference */
    releaseChannel?: 'release' | 'beta' | 'alpha';
}
/**
 * Minecraft version compatibility range
 */
export interface MinecraftVersionRange {
    /** Minimum supported version (e.g., "1.16") */
    min: string;
    /** Maximum supported version (e.g., "1.21") */
    max: string;
}
/**
 * A plugin entry in the curated registry
 */
export interface RegistryPlugin {
    /** Unique identifier (lowercase, hyphenated) */
    id: string;
    /** Display name */
    name: string;
    /** Short description */
    description: string;
    /** List of authors */
    authors: string[];
    /** Project website/homepage */
    website?: string;
    /** Plugin category */
    category: PluginCategory;
    /** Tags for search */
    tags: string[];
    /** Configured sources (in priority order) */
    sources: RegistryPluginSource[];
    /** Minecraft version compatibility */
    minecraftVersions: MinecraftVersionRange;
    /** Is this a premium/paid plugin? */
    premium?: boolean;
    /** Has this been manually verified by maintainers? */
    verified?: boolean;
    /** Featured as a popular plugin? */
    popular?: boolean;
    /** Other plugin IDs this depends on */
    dependencies?: string[];
    /** Plugins that conflict with this one */
    conflicts?: string[];
    /** Notes for users */
    notes?: string;
    /**
     * Extended metadata for recommendations (optional)
     * These fields may be populated from API sources during runtime
     */
    /** Total download count (populated from sources) */
    downloads?: number;
    /** Average rating (0-5, populated from sources) */
    rating?: number;
    /** Last updated date ISO string (populated from sources) */
    lastUpdated?: string;
    /** Creation date ISO string (populated from sources) */
    createdAt?: string;
    /** Current version (populated from sources) */
    version?: string;
}
/**
 * The full plugin registry file structure (v1 - single file format)
 */
export interface PluginRegistry {
    /** Registry format version (semver) */
    version: string;
    /** Last updated date (ISO 8601) */
    lastUpdated: string;
    /** Description of the registry */
    description?: string;
    /** All registered plugins */
    plugins: RegistryPlugin[];
}
/**
 * Registry metadata for directory-based format (v2)
 */
export interface RegistryMetadata {
    /** Registry format version (semver) */
    version: string;
    /** Last updated date (ISO 8601) */
    lastUpdated: string;
    /** Description of the registry */
    description?: string;
    /** Format type ('directory' for v2) */
    format: 'directory';
    /** Number of plugins in the registry */
    pluginCount: number;
    /** List of all categories */
    categories: PluginCategory[];
}
/**
 * Result from searching the registry
 */
export interface RegistrySearchResult {
    /** The matched plugin */
    plugin: RegistryPlugin;
    /** Match confidence score (0-1) */
    confidence: number;
    /** Why this was matched */
    matchReason: 'exact' | 'partial' | 'tag' | 'fuzzy';
}
/**
 * Unified search result from any source (registry or API)
 */
export interface UnifiedSearchResult {
    /** Source of the result */
    source: 'registry' | PluginSourceType;
    /** Plugin identifier (registry id or source-specific) */
    id: string;
    /** Display name */
    name: string;
    /** Short description */
    description?: string;
    /** Author(s) */
    authors: string[];
    /** Latest version */
    version?: string;
    /** Minecraft versions supported */
    minecraftVersions?: string[];
    /** Download count (if available) */
    downloads?: number;
    /** Last updated (ISO 8601) */
    lastUpdated?: string;
    /** Download URL (if available) */
    downloadUrl?: string;
    /** Project URL */
    projectUrl?: string;
    /** Match confidence (0-1) */
    confidence: number;
    /** Is from curated registry */
    fromRegistry: boolean;
    /** Original registry plugin (if from registry) */
    registryPlugin?: RegistryPlugin;
}
/**
 * Options for searching plugins
 */
export interface PluginSearchOptions {
    /** Search query */
    query: string;
    /** Maximum results */
    limit?: number;
    /** Target Minecraft version */
    minecraftVersion?: string;
    /** Filter by category */
    category?: PluginCategory;
    /** Sources to search (default: all) */
    sources?: PluginSourceType[];
    /** Search registry first (default: true) */
    searchRegistryFirst?: boolean;
    /** Stop after first source finds results (default: false) */
    stopOnFirstResult?: boolean;
    /** Include API sources even if registry has result (default: true) */
    includeApiResults?: boolean;
}
/**
 * Plugin confirmation dialog data
 */
export interface PluginConfirmData {
    /** Plugin name */
    name: string;
    /** Authors */
    authors: string[];
    /** Description */
    description?: string;
    /** Plugin version */
    version: string;
    /** Minecraft versions supported */
    minecraftVersions: string[];
    /** Source type */
    source: 'registry' | PluginSourceType;
    /** Source display name */
    sourceDisplay: string;
    /** Download URL */
    downloadUrl: string;
    /** File size (if known) */
    fileSize?: number;
    /** Is from curated registry */
    fromRegistry: boolean;
    /** Category */
    category?: PluginCategory;
    /** Is premium plugin */
    premium?: boolean;
    /** Is verified */
    verified?: boolean;
    /** Dependencies to install */
    dependencies?: string[];
}
//# sourceMappingURL=registry-types.d.ts.map