/// <reference types="node" />
import { Entity } from '@backstage/catalog-model';
import { Hash } from 'crypto';
import { Knex } from 'knex';
import { Logger } from 'winston';
import { ProcessingDatabase, RefreshStateItem } from '../database/types';
import { CatalogProcessingOrchestrator, EntityProcessingResult } from './types';
import { Stitcher } from '../stitching/types';
import { PluginTaskScheduler } from '@backstage/backend-tasks';
import { Config } from '@backstage/config';
export type ProgressTracker = ReturnType<typeof progressTracker>;
export declare class DefaultCatalogProcessingEngine {
    private readonly config;
    private readonly scheduler?;
    private readonly logger;
    private readonly knex;
    private readonly processingDatabase;
    private readonly orchestrator;
    private readonly stitcher;
    private readonly createHash;
    private readonly pollingIntervalMs;
    private readonly orphanCleanupIntervalMs;
    private readonly onProcessingError?;
    private readonly tracker;
    private stopFunc?;
    constructor(options: {
        config: Config;
        scheduler?: PluginTaskScheduler;
        logger: Logger;
        knex: Knex;
        processingDatabase: ProcessingDatabase;
        orchestrator: CatalogProcessingOrchestrator;
        stitcher: Stitcher;
        createHash: () => Hash;
        pollingIntervalMs?: number;
        orphanCleanupIntervalMs?: number;
        onProcessingError?: (event: {
            unprocessedEntity: Entity;
            errors: Error[];
        }) => Promise<void> | void;
        tracker?: ProgressTracker;
    });
    start(): Promise<void>;
    stop(): Promise<void>;
    private startPipeline;
    private startOrphanCleanup;
}
declare function progressTracker(): {
    processStart: (item: RefreshStateItem, logger: Logger) => {
        markProcessorsCompleted: (result: EntityProcessingResult) => void;
        markSuccessfulWithNoChanges: () => void;
        markSuccessfulWithErrors: () => void;
        markSuccessfulWithChanges: () => void;
        markFailed: (error: Error) => void;
    };
};
export {};
