/**
 * Core element interface that all element types must implement.
 * This provides the foundation for the portfolio system with support for:
 * - Identity and versioning
 * - References to external/internal resources
 * - Extensibility for future features
 * - Ratings and feedback mechanisms
 * - Lifecycle management
 */
import { ElementType } from '../../portfolio/types.js';
export interface IElement {
    id: string;
    type: ElementType;
    version: string;
    metadata: IElementMetadata;
    references?: Reference[];
    extensions?: Record<string, any>;
    ratings?: ElementRatings;
    validate(): ElementValidationResult;
    serialize(): string;
    deserialize(data: string): void;
    receiveFeedback?(feedback: string, context?: FeedbackContext): void;
    beforeActivate?(): Promise<void>;
    activate?(): Promise<void>;
    afterActivate?(): Promise<void>;
    deactivate?(): Promise<void>;
    getStatus(): ElementStatus;
}
export interface IElementMetadata {
    name: string;
    description: string;
    author?: string;
    version?: string;
    created?: string;
    modified?: string;
    tags?: string[];
    dependencies?: ElementDependency[];
    custom?: Record<string, any>;
}
export interface Reference {
    type: ReferenceType;
    uri: string;
    title: string;
    description?: string;
    required?: boolean;
    ragEnabled?: boolean;
    cacheable?: boolean;
    refreshInterval?: number;
}
export declare enum ReferenceType {
    INTERNAL = "internal",// Reference to another element
    EXTERNAL = "external",// Web URL
    DOCUMENT = "document",// Local or RAG document
    REPOSITORY = "repository",// Git repository
    API = "api",// API endpoint
    PORTFOLIO = "portfolio"
}
export interface ElementDependency {
    elementId: string;
    elementType: ElementType;
    versionConstraint?: string;
    optional?: boolean;
}
export interface ElementValidationResult {
    valid: boolean;
    errors?: ValidationError[];
    warnings?: ValidationWarning[];
    suggestions?: string[];
}
export interface ValidationError {
    field: string;
    message: string;
    code?: string;
}
export interface ValidationWarning {
    field: string;
    message: string;
    severity?: 'low' | 'medium' | 'high';
}
export declare enum ElementStatus {
    INACTIVE = "inactive",
    ACTIVATING = "activating",
    ACTIVE = "active",
    DEACTIVATING = "deactivating",
    ERROR = "error",
    SUSPENDED = "suspended"
}
export interface ElementRatings {
    aiRating: number;
    userRating?: number;
    ratingCount: number;
    lastEvaluated: Date;
    confidence: number;
    breakdown?: RatingBreakdown;
    ratingDelta?: number;
    trend: 'improving' | 'declining' | 'stable';
    feedbackHistory?: UserFeedback[];
}
export interface RatingBreakdown {
    effectiveness: number;
    reliability: number;
    usability: number;
    [key: string]: number;
}
export interface UserFeedback {
    timestamp: Date;
    feedback: string;
    sentiment: 'positive' | 'negative' | 'neutral';
    inferredRating?: number;
    context?: FeedbackContext;
    elementVersion?: string;
}
export interface FeedbackContext {
    task?: string;
    relatedElements?: string[];
    sessionId?: string;
    environmentData?: Record<string, any>;
}
export interface ISchemaVersion {
    schemaVersion?: string;
    migrate?(fromVersion: string): void;
}
//# sourceMappingURL=IElement.d.ts.map