/**
 * @fileoverview Semantic automation contract-related events
 * @author Semantest Team
 * @module domain/semantic-automation/events/semantest-contract-events
 */
import { Event } from '../../event';
import { SemanTestContract } from '../semantest-contract.entity';
/**
 * Contract discovered event payload
 */
export interface ContractDiscoveredPayload {
    readonly contract: SemanTestContract;
    readonly domain: string;
    readonly discoveryMethod: 'automatic' | 'manual' | 'ai-assisted';
    readonly confidence: number;
    readonly timestamp: Date;
    readonly discoveryContext?: {
        readonly url?: string;
        readonly userAgent?: string;
        readonly discoveredBy?: string;
    };
}
/**
 * Contract validated event payload
 */
export interface ContractValidatedPayload {
    readonly contractId: string;
    readonly domain: string;
    readonly validationResult: {
        readonly valid: boolean;
        readonly errors: string[];
        readonly warnings: string[];
        readonly score: number;
    };
    readonly validationType: 'structure' | 'execution' | 'cross-browser' | 'accessibility';
    readonly timestamp: Date;
    readonly validationContext?: {
        readonly browser?: string;
        readonly environment?: string;
        readonly performanceMetrics?: Record<string, number>;
    };
}
/**
 * Contract executed event payload
 */
export interface ContractExecutedPayload {
    readonly contractId: string;
    readonly domain: string;
    readonly capabilityName: string;
    readonly parameters: Record<string, any>;
    readonly result: {
        readonly success: boolean;
        readonly data?: any;
        readonly error?: string;
        readonly executionTime: number;
    };
    readonly timestamp: Date;
    readonly executionContext?: {
        readonly correlationId?: string;
        readonly sessionId?: string;
        readonly clientId?: string;
        readonly browser?: string;
    };
}
/**
 * Contract updated event payload
 */
export interface ContractUpdatedPayload {
    readonly contractId: string;
    readonly domain: string;
    readonly previousVersion: string;
    readonly newVersion: string;
    readonly changes: {
        readonly type: 'capability_added' | 'capability_removed' | 'capability_modified' | 'metadata_updated';
        readonly details: Record<string, any>;
    }[];
    readonly updatedBy: string;
    readonly timestamp: Date;
}
/**
 * Contract learning updated event payload
 */
export interface ContractLearningUpdatedPayload {
    readonly contractId: string;
    readonly domain: string;
    readonly learningType: 'success_pattern' | 'failure_pattern' | 'performance_optimization' | 'selector_improvement';
    readonly improvement: {
        readonly description: string;
        readonly confidence: number;
        readonly impact: 'low' | 'medium' | 'high';
        readonly appliedAutomatically: boolean;
    };
    readonly timestamp: Date;
    readonly learningContext?: {
        readonly dataPoints: number;
        readonly learningAlgorithm?: string;
        readonly trainingPeriod?: string;
    };
}
/**
 * Event fired when a new automation contract is discovered
 */
export declare class ContractDiscoveredEvent extends Event {
    constructor(payload: ContractDiscoveredPayload);
    /**
     * Get the discovered contract
     */
    getContract(): SemanTestContract;
    /**
     * Get the domain where contract was discovered
     */
    getDomain(): string;
    /**
     * Get discovery method
     */
    getDiscoveryMethod(): 'automatic' | 'manual' | 'ai-assisted';
    /**
     * Get discovery confidence score
     */
    getConfidence(): number;
    /**
     * Get discovery timestamp
     */
    getTimestamp(): Date;
}
/**
 * Event fired when a contract is validated
 */
export declare class ContractValidatedEvent extends Event {
    constructor(payload: ContractValidatedPayload);
    /**
     * Get contract ID
     */
    getContractId(): string;
    /**
     * Get validation result
     */
    getValidationResult(): ContractValidatedPayload['validationResult'];
    /**
     * Check if validation passed
     */
    isValid(): boolean;
    /**
     * Get validation type
     */
    getValidationType(): ContractValidatedPayload['validationType'];
}
/**
 * Event fired when a contract capability is executed
 */
export declare class ContractExecutedEvent extends Event {
    constructor(payload: ContractExecutedPayload);
    /**
     * Get contract ID
     */
    getContractId(): string;
    /**
     * Get executed capability name
     */
    getCapabilityName(): string;
    /**
     * Get execution parameters
     */
    getParameters(): Record<string, any>;
    /**
     * Get execution result
     */
    getResult(): ContractExecutedPayload['result'];
    /**
     * Check if execution was successful
     */
    isSuccessful(): boolean;
    /**
     * Get execution time in milliseconds
     */
    getExecutionTime(): number;
}
/**
 * Event fired when a contract is updated
 */
export declare class ContractUpdatedEvent extends Event {
    constructor(payload: ContractUpdatedPayload);
    /**
     * Get contract ID
     */
    getContractId(): string;
    /**
     * Get previous version
     */
    getPreviousVersion(): string;
    /**
     * Get new version
     */
    getNewVersion(): string;
    /**
     * Get list of changes
     */
    getChanges(): ContractUpdatedPayload['changes'];
    /**
     * Get who updated the contract
     */
    getUpdatedBy(): string;
}
/**
 * Event fired when contract learning is updated through AI/ML
 */
export declare class ContractLearningUpdatedEvent extends Event {
    constructor(payload: ContractLearningUpdatedPayload);
    /**
     * Get contract ID
     */
    getContractId(): string;
    /**
     * Get learning type
     */
    getLearningType(): ContractLearningUpdatedPayload['learningType'];
    /**
     * Get improvement details
     */
    getImprovement(): ContractLearningUpdatedPayload['improvement'];
    /**
     * Check if improvement was applied automatically
     */
    wasAppliedAutomatically(): boolean;
    /**
     * Get improvement confidence score
     */
    getConfidence(): number;
}
//# sourceMappingURL=semantest-contract-events.d.ts.map