import type { PaginationParams } from '../../../providers/database/pagination/schemas.js';
import type { EntityReadModelSchema, EntitySource, EntityRelationReadModelSchema } from '../schemas/read-model-schemas.js';
import type { CatalogFiltersParams, CreateEntityParams } from './repositories/types.js';
import type { BffCatalogEntity, BffCatalogEntityList, BffCatalogRelatedEntityList, SidebarConnectedEntity } from '@redocly/theme/core/types';
import type { ServiceInstanceOptions } from '../../../providers/database/types.js';
import type { TransactionsManager } from '../../../providers/database/transactions-manager.js';
import type { Filter } from '../../../providers/database/pagination/types.js';
import type { ScorecardsStatus } from '../entities/types.js';
import type { GetEntityByIdParams } from '../types/params.js';
import type { BulkSyncResult } from './types.js';
import { BaseService } from '../../../providers/database/base-service.js';
import { type EntityDtoSchema, type EntityRelationDtoSchema } from '../schemas/dto-schemas.js';
import { CatalogEntitiesRepository } from './repositories/catalog-entities-repository.js';
import { type ListResponseResult } from '../../../web-server/utils/prepare-list-response.js';
export declare class CatalogEntitiesService extends BaseService<CatalogEntitiesRepository> {
    #private;
    constructor(catalogEntitiesRepository: CatalogEntitiesRepository, options?: ServiceInstanceOptions);
    static getInstance(options: ServiceInstanceOptions): Promise<CatalogEntitiesService>;
    sync(): Promise<void>;
    transaction<T>(...args: Parameters<TransactionsManager['transaction']>): Promise<T>;
    getEntities({ paginationParams, rbacTeams, excludedTypes, excludedEntities }: {
        paginationParams: PaginationParams;
        rbacTeams?: string[];
        excludedTypes?: string[];
        excludedEntities?: string[];
    }): Promise<ListResponseResult<EntityReadModelSchema>>;
    getEntityById(id: string, params?: GetEntityByIdParams): Promise<EntityReadModelSchema | null>;
    getEntityKeysAndVersionsBySourceFile(sourceFile: string): Promise<Set<string>>;
    getEntitiesCountByTypes(): Promise<{
        type: string;
        count: number;
    }[]>;
    getCatalogFilters(params: CatalogFiltersParams): Promise<Record<string, import("./repositories/types.js").FilterOption[]>>;
    getEntityRelationById(id: string): Promise<EntityRelationReadModelSchema | null>;
    getEntitiesRelations(paginationParams?: PaginationParams): Promise<ListResponseResult<EntityRelationReadModelSchema>>;
    getEntitiesWithRelations({ paginationParams, rbacTeams, excludedTypes, excludedEntities }: {
        paginationParams: PaginationParams;
        rbacTeams?: string[];
        excludedTypes?: string[];
        excludedEntities?: string[];
    }): Promise<BffCatalogEntityList>;
    getEntityWithRelationsByKey({ entityKey, filter, rbacTeams, excludedTypes, excludedEntities }: {
        entityKey: string;
        filter?: {
            revision?: string | null;
            version?: string | null;
        };
        rbacTeams?: string[];
        excludedTypes?: string[];
        excludedEntities?: string[];
    }): Promise<BffCatalogEntity | null>;
    getRelatedEntities({ entityKey, paginationParams, rbacTeams, excludedTypes, excludedEntities }: {
        entityKey: string;
        paginationParams: PaginationParams;
        rbacTeams?: string[];
        excludedTypes?: string[];
        excludedEntities?: string[];
    }): Promise<BffCatalogRelatedEntityList>;
    listEntityRevisions(entityKey: string, version?: string | null): Promise<import("../schemas/read-model-schemas.js").EntityRevisionSummary[]>;
    getOutdatedEntities(filter?: Filter): Promise<EntityReadModelSchema[]>;
    getEntitiesCount(source: EntitySource, addedEntities?: EntityReadModelSchema[], entitiesRemovedCount?: number): Promise<{
        total: number;
    }>;
    createEntity(createEntityParams: CreateEntityParams): Promise<EntityReadModelSchema | null>;
    createEntities(entities: EntityDtoSchema[], source: EntitySource): Promise<BulkSyncResult<EntityReadModelSchema>>;
    getEntitySources(): Record<string, SidebarConnectedEntity>;
    /**
     * Use only internally, everything that is created via API should be created in the remote database.
     * @param relations - The entity to create.
     */
    createEntityRelations(relations: EntityRelationDtoSchema[]): Promise<void>;
    updateEntity(incomingEntity: Partial<EntityDtoSchema>, entityToBeUpdated: EntityReadModelSchema): Promise<EntityReadModelSchema | null>;
    deleteEntity(entityToBeRemoved: EntityReadModelSchema): Promise<string | null>;
    deleteEntities(filter: Filter): Promise<void>;
    createEntityRelation(relation: EntityRelationDtoSchema): Promise<EntityRelationReadModelSchema | null>;
    createEntitiesRelations(entities: EntityRelationDtoSchema[]): Promise<BulkSyncResult<EntityRelationReadModelSchema>>;
    updateEntityRelation(incomingRelationData: Partial<EntityRelationDtoSchema>, relationToBeUpdated: EntityRelationReadModelSchema): Promise<EntityRelationReadModelSchema | null>;
    deleteEntityRelation(id: string): Promise<string | null>;
    softDeleteEntitiesWithRelations({ filter, revision, fileHash }: {
        filter: Filter;
        revision: string;
        fileHash: string;
    }): Promise<void>;
    updateEntityScorecardsStatus(entityId: string, status: ScorecardsStatus): Promise<boolean>;
    updateEntityScorecardsStatusIfCalculating(entityId: string, status: Extract<ScorecardsStatus, 'UP_TO_DATE' | 'OUTDATED'>): Promise<boolean>;
    setEntitiesAsOutdated(filter: Filter): Promise<void>;
}
//# sourceMappingURL=catalog-entities-service.d.ts.map