import type { DatabaseClient } from '../../../../../providers/database/client.js';
import type { DatabaseEntityRelation, DatabaseEntityRelationDto } from '../../../../../providers/database/databases/sqlite-db/schemas/entities-relations-table.js';
import type { Filter } from '../../../../../providers/database/pagination/types.js';
import type { EntityRelationDtoSchema } from '../../../schemas/dto-schemas.js';
import type { EntityRelationReadModelSchema } from '../../../schemas/read-model-schemas.js';
export declare class RelationsWriteRepository {
    #private;
    constructor(db: DatabaseClient, organizationId: string, projectId: string);
    createEntityRelation(entityRelation: EntityRelationDtoSchema): Promise<EntityRelationReadModelSchema | null>;
    createEntityRelations(relations: EntityRelationDtoSchema[]): Promise<(EntityRelationReadModelSchema | null)[]>;
    upsertEntityRelation(entityRelation: DatabaseEntityRelationDto): Promise<DatabaseEntityRelation | null>;
    deleteEntityRelation(id: string): Promise<string | null>;
    deleteEntitiesRelations(filter: Filter): Promise<boolean>;
    /**
     * Deletes entity relations when an entity is removed.
     * The deletion logic depends on what other revisions exist:
     * - If this is the only revision of the key: remove all relations with this key (source or target)
     * - If this is the only revision with given version: remove relations with key+version (any revision)
     * - Always: remove relations with exact key+version+revision match
     */
    deleteEntityRelationsOnEntityRemoval(entity: {
        id: string;
        key: string;
        version?: string | null;
        revision?: string | null;
    }): Promise<void>;
}
//# sourceMappingURL=relations-write-repository.d.ts.map