import type { Entity } from "../entities";
import type { EntityRelation } from "../relations";
export declare class RelationAccessor {
    private readonly _relations;
    constructor(relations: EntityRelation[]);
    get all(): EntityRelation[];
    exists(relation: EntityRelation): boolean;
    /**
     * Searches for the relations of [entity_name]
     */
    relationsOf(entity: Entity): EntityRelation[];
    sourceRelationsOf(entity: Entity): EntityRelation[];
    /**
     * Search for relations that have [entity] as target
     * - meaning it returns entities that holds a local reference field
     */
    targetRelationsOf(entity: Entity): EntityRelation[];
    listableRelationsOf(entity: Entity): EntityRelation[];
    /**
     * Searches for the relations of [entity_name] and
     * return the one that has [reference] as source or target.
     */
    relationOf(entity: Entity, reference: string): EntityRelation | undefined;
    hasRelations(entity: Entity): boolean;
    /**
     * Get a list of related entities of [entity_name]
     */
    relatedEntitiesOf(entity: Entity): Entity[];
    /**
     * Get relation names of [entity_name]
     */
    relationReferencesOf(entity: any): string[];
}
