import { CompoundEntityRef, Entity } from '@backstage/catalog-model';
import { Location } from '@backstage/catalog-client';
import { BackstageCredentials } from '@backstage/backend-plugin-api';
/**
 * Holds the information required to create a new location in the catalog location store.
 *
 * @public
 */
export interface LocationInput {
    type: string;
    target: string;
}
/**
 * The location service manages entity locations.
 * @public
 */
export interface LocationService {
    createLocation(location: LocationInput, dryRun: boolean, options: {
        credentials: BackstageCredentials;
    }): Promise<{
        location: Location;
        entities: Entity[];
        exists?: boolean;
    }>;
    listLocations(options: {
        credentials: BackstageCredentials;
    }): Promise<Location[]>;
    getLocation(id: string, options: {
        credentials: BackstageCredentials;
    }): Promise<Location>;
    deleteLocation(id: string, options: {
        credentials: BackstageCredentials;
    }): Promise<void>;
    getLocationByEntity(entityRef: CompoundEntityRef | string, options: {
        credentials: BackstageCredentials;
    }): Promise<Location>;
}
/**
 * Options for requesting a refresh of entities in the catalog.
 *
 * @public
 */
export type RefreshOptions = {
    /** The reference to a single entity that should be refreshed */
    entityRef: string;
    credentials: BackstageCredentials;
};
/**
 * A service that manages refreshes of entities in the catalog.
 *
 * @public
 */
export interface RefreshService {
    /**
     * Request a refresh of entities in the catalog.
     */
    refresh(options: RefreshOptions): Promise<void>;
}
/**
 * Interacts with the database to manage locations.
 * @public
 */
export interface LocationStore {
    createLocation(location: LocationInput): Promise<Location>;
    listLocations(): Promise<Location[]>;
    getLocation(id: string): Promise<Location>;
    deleteLocation(id: string): Promise<void>;
    getLocationByEntity(entityRef: CompoundEntityRef | string): Promise<Location>;
}
