/** * Risk Review Types * * Shared type definitions for Risk Review integration components. * These types are used across ReviewProcessing, ReviewDetails, ReviewResults, * ReviewFiles, and CategoryFilters components. */ /** * Content type for review */ export type ReviewContentType = 'file' | 'text' | 'weburl'; /** * Platform mode affecting UI behavior */ export type ReviewPlatform = 'extension' | 'webapp'; /** * Status for individual file in multi-file processing */ export type FileProgressStatus = 'pending' | 'uploading' | 'processing' | 'completed' | 'failed'; /** * Risk data matching RiskCard expectations */ export interface RiskItem { /** Unique identifier for the risk */ id: string; /** Risk title/rule name */ title: string; /** Description of the issue */ description: string; /** Recommendation for resolving the issue */ recommendation?: string; /** The specific sentence where the issue was found */ sentence?: string; /** The specific term that triggered the risk */ term?: string; } /** * File validation error info */ export interface FileValidationError { /** Error type code */ code: 'size' | 'type' | 'other'; /** Human-readable error message */ message: string; } /** * Source of a file */ export type FileSource = 'dragdrop' | 'browse' | 'paste' | 'url' | 'page' | 'download' | 'connector'; /** * File item for display in ReviewFiles component */ export interface ReviewFileItem { /** Unique identifier */ id: string; /** File display name */ name: string; /** File size in bytes */ size: number; /** MIME type */ type: string; /** Source of the file */ source?: FileSource; /** Source path/URL for display */ sourcePath?: string; /** Validation error if invalid */ validationError?: FileValidationError; /** Whether currently selected */ isSelected?: boolean; } /** * Progress tracking for individual file */ export interface FileProgressItem { /** Unique identifier for the file */ fileId: string; /** Display name of the file */ fileName: string; /** Current processing status */ status: FileProgressStatus; /** Progress percentage (0-100) for uploading phase */ progress?: number; /** Status message for UI display */ message?: string; /** Error message if status is 'failed' */ error?: string; } /** * Overall progress data for multi-file processing */ export interface MultiFileProgressData { /** Total number of files being processed */ totalFiles: number; /** Number of successfully completed files */ completedFiles: number; /** Number of failed files */ failedFiles: number; /** Individual file progress entries */ files: FileProgressItem[]; } /** * File-specific results for multi-file mode */ export interface FileResultData { /** Unique file identifier */ fileId: string; /** Display name of the file */ fileName: string; /** Risks found in this file */ risks: RiskItem[]; /** Status of this file's review */ status: 'completed' | 'failed'; /** Error message if failed */ error?: string; /** Whether this file section is expanded */ isExpanded?: boolean; /** PDF file ID for download action */ pdfFileId?: string; } /** * Action configuration for results */ export interface ResultAction { /** Action identifier */ id: string; /** Button label */ label: string; /** Icon name from Material Symbols */ icon?: string; /** Click handler */ onClick: () => void; /** Whether action is disabled */ isDisabled?: boolean; /** Whether action is loading */ isLoading?: boolean; /** Button variant */ variant?: 'primary' | 'secondary' | 'ghost'; } /** * Individual filter option */ export interface FilterOption { /** Unique identifier (UUID) */ id: string; /** Display label */ label: string; /** Sort order for display */ sortOrder?: number; } /** * Filter category definition */ export interface FilterCategoryData { /** Category identifier */ id: string; /** Category display name */ name: string; /** Whether multiple selections allowed */ isMultiple: boolean; /** Whether selection is required */ isRequired: boolean; /** Available options */ options: FilterOption[]; } /** * Selected values for a category */ export interface CategorySelection { /** Category identifier */ categoryId: string; /** Category name (for API format) */ categoryName: string; /** Selected option IDs */ selectedOptionIds: string[]; } /** * Filter selection for display (simplified format) */ export interface FilterSelection { /** Category display name */ categoryName: string; /** Selected option labels */ selectedLabels: string[]; } /** * Single file review details */ export interface SingleReviewData { /** Unique review identifier */ reviewId: string; /** Type of content reviewed */ type: ReviewContentType; /** File name (for file reviews) */ fileName?: string; /** Page URL (for weburl reviews) */ pageUrl?: string; /** Original text excerpt (for text reviews, truncated) */ textExcerpt?: string; /** When the review was completed */ timestamp: string | Date; /** Total risks found */ risksCount: number; /** Applied filters */ filters?: FilterSelection[]; } /** * Multi-file review details */ export interface MultiFileReviewData { /** Total number of files reviewed */ fileCount: number; /** When the review was completed */ timestamp: string | Date; /** Total risks across all files */ totalRisksCount: number; /** Number of successful file reviews */ successCount: number; /** Number of failed file reviews */ failedCount: number; /** Applied filters */ filters?: FilterSelection[]; } /** * Current page info for weburl type */ export interface CurrentPageInfo { /** Page title */ title: string; /** Page URL */ url: string; /** Favicon URL */ favIconUrl?: string; /** Whether the page can be captured */ isCaptureable: boolean; } /** * Connected app display configuration */ export interface ConnectedAppConfig { /** App display name */ name: string; /** Brand color */ color: string; /** Logo path or URL */ logoPath: string; } /** * Send to IB field option */ export interface FieldOption { /** Field UUID */ id: string; /** Field display name */ name: string; /** Database/folder info */ folderName?: string; } //# sourceMappingURL=riskReview.d.ts.map