/**
 * Object containing information on a specific file.
 */
import { ProcessingFileStatus, WorkflowFileStatus } from './types';
import { FileAttributes } from '../file-attributes';

export interface IFile {
    /**
     * Date and time when the file was added to the system.
     */
    readonly added?: string;
    /**
     * Shows if all manual changes have been applied by a reanalysis.
     */
    readonly allManualRedactionsApplied?: boolean;
    readonly analysisDuration?: number;
    readonly analysisRequired?: boolean;
    readonly approvalDate?: string;
    /**
     * The current reviewer's (if any) user id.
     */
    readonly assignee?: string;
    /**
     * Shows which dictionary versions was used during the analysis.
     */
    readonly dictionaryVersion?: number;
    /**
     * Shows which dossier dictionary versions was used during the analysis.
     */
    readonly dossierDictionaryVersion?: number;
    readonly dossierId: string;
    /**
     * Shows if the file was excluded from analysis.
     */
    readonly excluded?: boolean;
    readonly excludedFromAutomaticAnalysis?: boolean;
    readonly excludedPages?: number[];
    fileAttributes?: FileAttributes;
    readonly fileId: string;
    readonly filename: string;
    readonly fileSize: number;
    readonly hasAnnotationComments?: boolean;
    /**
     * Shows if any hints were found during the analysis.
     */
    readonly hasHints?: boolean;
    /**
     * Shows if any images were found during the analysis.
     */
    readonly hasImages?: boolean;
    /**
     * Shows if any redactions were found during the analysis.
     */
    readonly hasRedactions?: boolean;
    /**
     * Shows if any requests were found during the analysis.
     */
    readonly hasRequests?: boolean;
    readonly hasSuggestions?: boolean;
    /**
     * Shows if there is any change between the previous and current analysis.
     */
    readonly hasUpdates?: boolean;
    /**
     * Date and time when the files attributes was last updated.
     */
    readonly lastFileAttributeChange?: string;
    /**
     * Shows if this file has been OCRed by us. Last Time of OCR.
     */
    readonly lastOCRTime?: string;

    /**
     * OCR start Time.
     */
    readonly ocrStartTime?: string;
    /**
     * Number of pages that require OCR.
     */
    readonly numberOfPagesToOCR: number;
    /**
     * Number of pages already OCR-ed.
     */
    readonly numberOfOCRedPages: number;
    /**
     * OCR end Time.
     */
    readonly ocrEndTime?: string;
    /**
     * Shows the last date of a successful analysis.
     */
    readonly lastProcessed?: string;
    readonly lastLayoutProcessed?: string;
    /**
     * The last reviewer's (if any) user id.
     */
    readonly lastReviewer?: string;
    /**
     * The last approver's (if any) user id.
     */
    readonly lastApprover?: string;
    /**
     * Date and time when the file was last updated.
     */
    readonly lastUpdated?: string;
    /**
     * Shows last date the document was uploaded.
     */
    readonly lastUploaded?: string;
    /**
     * Shows which legal basis versions was used during the analysis.
     */
    readonly legalBasisVersion?: number;
    /**
     * The number of times the file has been analyzed.
     */
    readonly numberOfAnalyses: number;
    /**
     * The number of pages of the file.
     */
    readonly numberOfPages?: number;
    /**
     * Shows which rules versions was used during the analysis.
     */
    readonly rulesVersion?: number;
    /**
     * Shows if the file is soft deleted.
     */
    readonly softDeletedTime?: string;
    /**
     * The ID of the user who uploaded the file.
     */
    readonly uploader?: string;

    readonly processingStatus: ProcessingFileStatus;

    readonly workflowStatus: WorkflowFileStatus;

    readonly hasHighlights: boolean;

    readonly dossierArchived: boolean;

    readonly dossierTemplateId: string;

    /**
     * Last time the actual file was touched
     */
    readonly fileManipulationDate: string | null;
    readonly redactionModificationDate: string | null;
    readonly lastManualChangeDate?: string;
}
