import { CrossbowConfiguration, OutgoingSignals } from "./config";
import { CrossbowInput, CLI } from "./index";
import { ExternalFile, ExternalFileInput, ExternalFileContent, HashDirErrorTypes } from "./file.utils";
import { TaskReport } from "./task.runner";
import { CommandTrigger } from "./command.run";
import { SequenceItem } from "./task.sequence.factories";
import { InitConfigFileExistsError, InitConfigFileTypeNotSupported } from "./command.init";
import { ParsedPath } from "path";
import { Task, TaskCollection } from "./task.resolve";
import { WatchTask, Watcher, WatchTasks } from "./watch.resolve";
import { WatchRunners } from "./watch.runner";
import { DocsInputFileNotFoundError, DocsOutputFileExistsError } from "./command.docs";
import Rx = require('rx');
import { WatchEvent } from "./watch.file-watcher";
export interface Reporter {
    errors: {}[];
    type: ReporterTypes;
    callable?: Function;
    sources: ExternalFile[];
}
export declare enum ReporterErrorTypes {
    ReporterFileNotFound,
    ReporterTypeNotSupported,
}
export interface ReporterError {
    type: ReporterErrorTypes;
    file?: ExternalFile;
}
export interface ReporterFileNotFoundError extends ReporterError {
}
export interface ReporterTypeNotSupportedError extends ReporterError {
}
export declare enum ReporterTypes {
    InlineFunction,
    ExternalFile,
    UnsupportedValue,
    Muted,
}
export interface Reporters {
    all: Reporter[];
    valid: Reporter[];
    invalid: Reporter[];
}
export declare enum ReportTypes {
    DuplicateInputFile,
    InputFileCreated,
    InitInputFileTypeNotSupported,
    InputError,
    InputFileNotFound,
    InvalidReporter,
    UsingInputFile,
    TaskList,
    TaskTree,
    TaskErrors,
    TaskReport,
    NoTasksAvailable,
    NoTasksProvided,
    SimpleTaskList,
    BeforeWatchTaskErrors,
    BeforeTaskList,
    BeforeTasksDidNotComplete,
    BeforeTasksSummary,
    WatchTaskTasksErrors,
    WatchTaskErrors,
    WatchTaskReport,
    NoFilesMatched,
    NoWatchersAvailable,
    NoWatchTasksProvided,
    Watchers,
    WatcherNames,
    WatcherTriggeredTasksCompleted,
    WatcherTriggeredTasks,
    WatcherSummary,
    DocsAddedToFile,
    DocsGenerated,
    DocsInputFileNotFound,
    DocsOutputFileExists,
    DocsInvalidTasksSimple,
    HashDirError,
    Summary,
    SignalReceived,
    CLIParserOutput,
}
export interface IncomingReport {
    type: ReportTypes;
    data?: any;
}
export interface OutgoingReport {
    origin: ReportTypes;
    data: string[];
}
export interface UsingConfigFileReport extends IncomingReport {
    data: {
        sources: ExternalFileInput[];
    };
}
export interface InputFileNotFoundReport extends IncomingReport {
    data: {
        sources: ExternalFileInput[];
    };
}
export interface InputErrorReport extends IncomingReport {
    data: {
        errors: any[];
        sources: ExternalFileInput[];
    };
}
export interface TaskReportReport extends IncomingReport {
    data: {
        report: TaskReport;
        progress: boolean;
    };
}
export interface SignalReceivedReport extends IncomingReport {
    data: {
        code: number;
    };
}
export interface SummaryReport extends IncomingReport {
    data: {
        sequence: SequenceItem[];
        cli: CLI;
        config: CrossbowConfiguration;
        runtime: number;
        errors: TaskReport[];
    };
}
export interface BeforeTasksSummaryReport extends IncomingReport {
    data: {
        sequence: SequenceItem[];
        cli: CLI;
        config: CrossbowConfiguration;
        runtime: number;
        errors: TaskReport[];
    };
}
export interface WatcherSummaryReport extends IncomingReport {
    data: {
        sequence: SequenceItem[];
        cli: CLI;
        config: CrossbowConfiguration;
        runtime: number;
        errors: TaskReport[];
        watchEvent: WatchEvent;
        watcher: Watcher;
    };
}
export interface TaskListReport extends IncomingReport {
    data: {
        sequence: SequenceItem[];
        cli: CLI;
        titlePrefix: string;
        config: CrossbowConfiguration;
    };
}
export interface SimpleTaskListReport extends IncomingReport {
    data: {
        lines: string[];
    };
}
export interface InvalidReporterReport extends IncomingReport {
    data: {
        reporters: Reporters;
    };
}
export interface DuplicateConfigFile extends IncomingReport {
    data: {
        error: InitConfigFileExistsError;
    };
}
export interface ConfigFileCreatedReport extends IncomingReport {
    data: {
        parsed: ParsedPath;
    };
}
export interface InitInputFileTypeNotSupportedReport extends IncomingReport {
    data: {
        error: InitConfigFileTypeNotSupported;
    };
}
export interface TaskTreeReport extends IncomingReport {
    data: {
        tasks: Task[];
        config: CrossbowConfiguration;
        title: string;
    };
}
export interface TaskErrorsReport extends IncomingReport {
    data: {
        tasks: Task[];
        taskCollection: TaskCollection;
        input: CrossbowInput;
        config: CrossbowConfiguration;
    };
}
export interface WatchersReport extends IncomingReport {
    data: {
        watchTasks: WatchTask[];
    };
}
export interface BeforeWatchTaskErrorsReport extends IncomingReport {
    data: {
        watchTasks: WatchTasks;
        trigger: CommandTrigger;
    };
}
export interface BeforeTaskListReport extends IncomingReport {
    data: {
        sequence: SequenceItem[];
        cli: CLI;
        config: CrossbowConfiguration;
    };
}
export interface BeforeTasksDidNotCompleteReport extends IncomingReport {
    data: {
        error: Error;
    };
}
export interface WatchTaskTasksErrorsReport extends IncomingReport {
    data: {
        tasks: Task[];
        runner: Watcher;
        config: CrossbowConfiguration;
    };
}
export interface WatchTaskErrorsReport extends IncomingReport {
    data: {
        watchTasks: WatchTask[];
    };
}
export interface WatchTaskReportReport extends IncomingReport {
    data: {
        report: TaskReport;
        trigger: CommandTrigger;
    };
}
export interface WatcherTriggeredTasksReport extends IncomingReport {
    data: {
        index: number;
        taskCollection: TaskCollection;
    };
}
export interface WatcherTriggeredTasksCompletedReport extends IncomingReport {
    data: {
        index: number;
        taskCollection: TaskCollection;
        time: number;
    };
}
export interface WatcherNamesReport extends IncomingReport {
    data: {
        runners: WatchRunners;
        trigger: CommandTrigger;
    };
}
export interface NoFilesMatchedReport extends IncomingReport {
    data: {
        watcher: Watcher;
    };
}
export interface DocsInputFileNotFoundReport extends IncomingReport {
    data: {
        error: DocsInputFileNotFoundError;
    };
}
export interface DocsAddedToFileReport extends IncomingReport {
    data: {
        file: ExternalFileContent;
    };
}
export interface DocsOutputFileExistsReport extends IncomingReport {
    data: {
        error: DocsOutputFileExistsError;
    };
}
export interface HashError extends Error {
    type: HashDirErrorTypes;
}
export interface HashDirErrorReport extends IncomingReport {
    data: {
        error: HashError;
        cwd: string;
    };
}
export declare function getReporters(config: CrossbowConfiguration, input: CrossbowInput): Reporters;
export declare type OutgoingReporter = Rx.Subject<OutgoingReport>;
export declare function getOutputObserver(mergedConfig: CrossbowConfiguration, outputObserver: OutgoingReporter): Rx.Observable<OutgoingReport>;
export declare function getSignalReporter(mergedConfig: CrossbowConfiguration, signalObserver?: OutgoingSignals): OutgoingSignals;
export declare function getDefaultReporter(): any;
