/** * F5 CLI - Excel Import Schema Types * Defines types for flexible Excel-to-Jira import mapping * * @module @f5/cli/types/excel-schema * @version 1.0.0 */ export interface ExcelImportSchema { schema_version: string; name: string; description?: string; created_at: string; last_used?: string; source: SourceConfig; column_mapping: ColumnMapping[]; validation: ValidationConfig; output: OutputConfig; } export interface SourceConfig { main_sheet: string; header_row: number; data_start_row: number; detail_sheets?: DetailSheetConfig; } export interface DetailSheetConfig { pattern: string; link_column: string; } export interface ColumnMapping { excel: string; jira: JiraField; transform?: string; required?: boolean; max_length?: number; multiline?: boolean; append_from_detail_sheet?: boolean; value_mapping?: Record; default?: string; format?: 'date' | 'number' | 'string'; date_format?: string; } export type JiraField = 'Summary' | 'Description' | 'Issue Type' | 'Priority' | 'Status' | 'Assignee' | 'Reporter' | 'Labels' | 'Component' | 'Due Date' | 'External ID' | 'Epic Link' | 'Sprint' | 'Story Points' | 'Original Estimate' | 'Environment' | 'Affects Version' | 'Fix Version' | string; export interface ValidationConfig { skip_empty_rows: boolean; required_fields: string[]; unique_fields: string[]; max_summary_length?: number; } export interface OutputConfig { format: 'csv' | 'json' | 'jira-api'; encoding: string; filename_template: string; include_headers?: boolean; } export interface AnalysisResult { file_path: string; file_name: string; sheets: SheetInfo[]; recommended_main_sheet: string; detected_header_row: number; detected_data_start_row: number; detected_mappings: DetectedMapping[]; confidence_score: number; warnings: AnalysisWarning[]; complexity: ComplexityLevel; has_images: boolean; has_formulas: boolean; has_merged_cells: boolean; } export interface SheetInfo { name: string; row_count: number; column_count: number; is_data_sheet: boolean; is_detail_sheet: boolean; headers: string[]; sample_data: string[][]; } export interface DetectedMapping { excel_column: string; excel_index: number; excel_header: string; suggested_jira_field: JiraField; confidence: number; sample_values: string[]; detected_type: 'text' | 'number' | 'date' | 'enum'; unique_values?: string[]; } export interface AnalysisWarning { level: 'info' | 'warning' | 'error'; code: WarningCode; message: string; details?: string; } export type WarningCode = 'MANY_SHEETS' | 'LOW_CONFIDENCE' | 'UNMAPPED_COLUMNS' | 'COMPLEX_STRUCTURE' | 'MISSING_HEADERS' | 'EMPTY_ROWS' | 'MERGED_CELLS' | 'FORMULAS_DETECTED' | 'IMAGES_DETECTED' | 'DUPLICATE_HEADERS' | 'NON_STANDARD_ENCODING'; export type ComplexityLevel = 'simple' | 'medium' | 'complex'; export interface ConversionResult { csv: string; json?: object[]; rowCount: number; skippedRows: number; warnings: string[]; fieldMappings: ProcessedRow[]; stats: ConversionStats; } export interface ProcessedRow { row_number: number; external_id?: string; summary: string; description: string; issue_type: string; priority: string; labels: string[]; component?: string; assignee?: string; due_date?: string; status?: string; [key: string]: any; } export interface ConversionStats { total_rows: number; converted_rows: number; skipped_rows: number; by_issue_type: Record; by_priority: Record; by_status?: Record; } export interface ExcelImportOptions { schema?: string; configure?: boolean; analyze?: boolean; claudeCode?: boolean; target?: 'jira' | 'github' | 'redmine'; output?: string; sheet?: string; headerRow?: string; verbose?: boolean; } export declare const JIRA_FIELD_PATTERNS: Record; export declare const ISSUE_TYPE_MAPPINGS: Record; export declare const PRIORITY_MAPPINGS: Record; export declare const STATUS_MAPPINGS: Record;