/// <reference types="node" />
import { Entity } from '@backstage/catalog-model';
import { AnalyzeLocationExistingEntity } from '@backstage/plugin-catalog-common';
import { JsonValue } from '@backstage/types';
import { CatalogProcessorEmit } from '../api';
/**
 * Entities that are not yet processed.
 * @public
 */
export type DeferredEntity = {
    entity: Entity;
    locationKey?: string;
};
/** @public */
export type PlaceholderResolverRead = (url: string) => Promise<Buffer>;
/** @public */
export type PlaceholderResolverResolveUrl = (url: string, base: string) => string;
/** @public */
export type PlaceholderResolverParams = {
    key: string;
    value: JsonValue;
    baseUrl: string;
    read: PlaceholderResolverRead;
    resolveUrl: PlaceholderResolverResolveUrl;
    emit: CatalogProcessorEmit;
};
/** @public */
export type PlaceholderResolver = (params: PlaceholderResolverParams) => Promise<JsonValue>;
/** @public */
export type AnalyzeOptions = {
    url: string;
    catalogFilename?: string;
};
/** @public */
export type ScmLocationAnalyzer = {
    /** The method that decides if this analyzer can work with the provided url */
    supports(url: string): boolean;
    /** This function can return an array of already existing entities */
    analyze(options: AnalyzeOptions): Promise<{
        /** Existing entities in the analyzed location */
        existing: AnalyzeLocationExistingEntity[];
    }>;
};
