/** * Semantic type inference and validation. * * This module defines semantic types that can be inferred from parameter * names and descriptions, enabling more intelligent validation testing. */ /** * Semantic types that can be inferred from parameter descriptions. * Used to generate targeted validation tests. */ export type SemanticType = 'date_iso8601' | 'date_month' | 'datetime' | 'timestamp' | 'amount_currency' | 'percentage' | 'identifier' | 'email' | 'url' | 'phone' | 'ip_address' | 'file_path' | 'json' | 'base64' | 'regex' | 'unknown'; /** * Inference result for a parameter. * Contains the inferred semantic type and confidence level. */ export interface SemanticInference { /** Parameter name that was analyzed */ paramName: string; /** The inferred semantic type */ inferredType: SemanticType; /** Confidence level (0-1) */ confidence: number; /** Evidence supporting the inference */ evidence: string[]; } /** * Result of validating a value against an expected semantic type. */ export interface SemanticValidationResult { /** Parameter name that was validated */ paramName: string; /** The expected semantic type */ expectedType: SemanticType; /** The value that was validated */ providedValue: unknown; /** Whether the value is valid for the expected type */ isValid: boolean; /** Description of the validation issue (if invalid) */ issue?: string; } /** * Pattern definition for semantic type inference. * Contains patterns to match against parameter names and descriptions. */ export interface SemanticPatternDefinition { /** Patterns to match against parameter names */ namePatterns: RegExp[]; /** Patterns to match against parameter descriptions */ descriptionPatterns: RegExp[]; /** Optional patterns to validate actual values */ formatPatterns?: RegExp[]; } /** * Patterns for semantic type inference. * Maps each semantic type to patterns that indicate that type. */ export declare const SEMANTIC_PATTERNS: Record; /** * Get all known semantic types (excluding 'unknown'). */ export declare function getAllSemanticTypes(): SemanticType[]; /** * Check if a value is a valid SemanticType. */ export declare function isSemanticType(value: string): value is SemanticType; //# sourceMappingURL=semantic-types.d.ts.map