/**
 * Search Type Definitions
 *
 * Types for the universal search and filter system.
 *
 * @since v1.68.0
 */
/**
 * Types of searchable content
 */
export type SearchResultType = 'plugin' | 'registry' | 'server' | 'command' | 'backup' | 'log' | 'activity' | 'config' | 'help';
/**
 * Quick action available on a search result
 */
export interface SearchAction {
    /** Unique action ID */
    id: string;
    /** Display label */
    label: string;
    /** Keyboard shortcut */
    shortcut?: string;
    /** Action handler */
    execute: () => void | Promise<void>;
}
/**
 * A single search result
 */
export interface SearchResult {
    /** Result type */
    type: SearchResultType;
    /** Unique identifier */
    id: string;
    /** Display title */
    title: string;
    /** Secondary text */
    subtitle?: string;
    /** Icon/emoji */
    icon?: string;
    /** Relevance score 0-1 */
    score: number;
    /** Matched text with highlighting markers */
    highlight?: string;
    /** Available quick actions */
    actions?: SearchAction[];
    /** Additional metadata */
    metadata?: Record<string, unknown>;
}
/**
 * Search options
 */
export interface SearchOptions {
    /** Search query */
    query: string;
    /** Limit to specific scopes */
    scopes?: SearchResultType[];
    /** Maximum results per scope */
    limit?: number;
    /** Enable fuzzy matching */
    fuzzy?: boolean;
    /** Include hidden/disabled items */
    includeHidden?: boolean;
    /** Minimum score threshold (0-1) */
    minScore?: number;
}
/**
 * Grouped search results
 */
export interface SearchResults {
    /** Query that was executed */
    query: string;
    /** Results grouped by type */
    groups: SearchResultGroup[];
    /** Total result count across all groups */
    totalCount: number;
    /** Search execution time in ms */
    searchTime: number;
}
/**
 * A group of search results of the same type
 */
export interface SearchResultGroup {
    /** Result type */
    type: SearchResultType;
    /** Display label for the group */
    label: string;
    /** Results in this group */
    results: SearchResult[];
    /** Total count (may be more than returned if limited) */
    totalCount: number;
}
/**
 * A document that can be indexed for search
 */
export interface IndexableDocument {
    /** Unique document ID */
    id: string;
    /** Document type */
    type: SearchResultType;
    /** Primary searchable text */
    title: string;
    /** Secondary searchable text */
    description?: string;
    /** Keywords/tags */
    tags?: string[];
    /** Category */
    category?: string;
    /** Additional searchable fields */
    fields?: Record<string, string | number | boolean | string[]>;
    /** Data for result display */
    metadata?: Record<string, unknown>;
}
/**
 * Index entry for a plugin
 */
export interface PluginIndexEntry extends IndexableDocument {
    type: 'plugin' | 'registry';
    /** Plugin name (lowercased for matching) */
    nameLower: string;
    /** Name split into tokens */
    nameTokens: string[];
    /** Description tokens */
    descriptionTokens: string[];
    /** Plugin author */
    author?: string;
    /** Plugin source */
    source?: string;
    /** Plugin version */
    version?: string;
    /** Status flags */
    status: string[];
    /** Health score 0-100 */
    health?: number;
    /** Download count */
    downloads?: number;
    /** Last updated timestamp */
    updated?: number;
}
/**
 * Index entry for a command
 */
export interface CommandIndexEntry extends IndexableDocument {
    type: 'command';
    /** Command shortcut */
    shortcut?: string;
    /** Command keywords */
    keywords?: string[];
}
/**
 * Index entry for a log entry
 */
export interface LogIndexEntry extends IndexableDocument {
    type: 'log';
    /** Log level */
    level: 'debug' | 'info' | 'warn' | 'error';
    /** Timestamp */
    timestamp: number;
    /** Source plugin/component */
    source?: string;
}
/**
 * Search history entry
 */
export interface SearchHistoryEntry {
    /** Search query */
    query: string;
    /** When the search was performed */
    timestamp: number;
    /** Number of results */
    resultCount: number;
    /** Scopes searched */
    scopes?: SearchResultType[];
}
/**
 * Saved search configuration
 */
export interface SavedSearch {
    /** Unique ID */
    id: string;
    /** Display name */
    name: string;
    /** Search query */
    query: string;
    /** Scopes to search */
    scopes?: SearchResultType[];
    /** Is a default/system search */
    isDefault?: boolean;
    /** Created timestamp */
    createdAt: number;
    /** Last used timestamp */
    lastUsedAt?: number;
    /** Enable alerts for new matches */
    alertEnabled?: boolean;
}
/**
 * Token with position info for highlighting
 */
export interface MatchToken {
    /** The matched text */
    text: string;
    /** Start position in original string */
    start: number;
    /** End position in original string */
    end: number;
    /** Whether this is a match */
    isMatch: boolean;
}
/**
 * Result of fuzzy matching
 */
export interface FuzzyMatchResult {
    /** Whether there was a match */
    matched: boolean;
    /** Match score 0-1 */
    score: number;
    /** Matched tokens for highlighting */
    tokens?: MatchToken[];
}
/**
 * Search index statistics
 */
export interface SearchIndexStats {
    /** Document counts by type */
    documentCounts: Record<SearchResultType, number>;
    /** Total document count */
    totalDocuments: number;
    /** Total terms in index */
    totalTerms: number;
    /** Index size estimate in bytes */
    sizeBytes: number;
    /** Last index update time */
    lastUpdated: number;
}
/**
 * Display labels for result types
 */
export declare const RESULT_TYPE_LABELS: Record<SearchResultType, string>;
/**
 * Icons for result types
 */
export declare const RESULT_TYPE_ICONS: Record<SearchResultType, string>;
//# sourceMappingURL=search-types.d.ts.map