import { PrismaService } from '@hed-hog/api-prisma';
import { IntegrationLink, LinkType } from '../types';
export interface CreateIntegrationLinkDto {
    sourceModule: string;
    sourceEntityType: string;
    sourceEntityId: string;
    targetModule: string;
    targetEntityType: string;
    targetEntityId: string;
    linkType: LinkType;
    metadata?: Record<string, any>;
}
export interface IntegrationLinkPersistenceClient {
    integrationLink?: PrismaService['integrationLink'];
    integration_link?: PrismaService['integration_link'];
}
export declare class IntegrationLinkService {
    private readonly prisma;
    constructor(prisma: PrismaService);
    private resolvePersistence;
    private toDomainLink;
    private toDatabaseId;
    /**
     * Create a link between entities from different modules
     */
    createLink(dto: CreateIntegrationLinkDto, persistenceClient?: IntegrationLinkPersistenceClient): Promise<IntegrationLink>;
    /**
     * Find all links originating from a source entity
     */
    findOutbound(sourceModule: string, sourceEntityType: string, sourceEntityId: string): Promise<IntegrationLink[]>;
    /**
     * Find all links terminating at a target entity
     */
    findInbound(targetModule: string, targetEntityType: string, targetEntityId: string): Promise<IntegrationLink[]>;
    /**
     * Find links of a specific type
     */
    findByLinkType(linkType: LinkType): Promise<IntegrationLink[]>;
    /**
     * Delete a link
     */
    deleteLink(linkId: string): Promise<IntegrationLink>;
    /**
     * Get link by ID
     */
    getById(linkId: string): Promise<IntegrationLink | null>;
    /**
     * Find bidirectional link between two entities
     */
    findBidirectional(module1: string, entity1Type: string, entity1Id: string, module2: string, entity2Type: string, entity2Id: string): Promise<IntegrationLink | null>;
    /**
     * Count links from a module
     */
    countFromModule(sourceModule: string): Promise<number>;
}
//# sourceMappingURL=integration-link.service.d.ts.map