import { ClsService } from "nestjs-cls"; import { AbstractRepository } from "../../../core/neo4j/abstracts/abstract.repository"; import { Neo4jService } from "../../../core/neo4j/services/neo4j.service"; import { SecurityService } from "../../../core/security/services/security.service"; import { Assistant, AssistantDescriptor } from "../entities/assistant"; /** * AssistantRepository * * Extends the standard company-scoped match with an additional owner check — * a user can only see/modify assistants they created. * * The `$currentUserId` parameter is auto-injected into queryParams by * `Neo4jService.initQuery()` (reads `clsService.get("userId")`), so the * `buildUserHasAccess` override can reference `$currentUserId` directly. */ export declare class AssistantRepository extends AbstractRepository { protected readonly descriptor: import("../../..").EntityDescriptor import("../../..").DataModelInterface; }; }; }>; constructor(neo4j: Neo4jService, securityService: SecurityService, clsService: ClsService); protected buildUserHasAccess(): string; /** * Attach the thread to the resource it is scoped to: * `(Assistant)-[:BOUND_TO]->(target)`. * * This cannot go through the generic create path. `BOUND_TO` is declared * polymorphic on the descriptor (any registered model may be the target), so * `relationships.content.model` is only a placeholder — `assistantMeta`. * `AbstractRepository.create` reads `rel.model.labelName` both to validate the * target exists (abstract.repository.ts:713) and to build the edge MATCH * (:822), so routing a Campaign id through it looks for * `(:Assistant { id: })` and fails with "One or more related * nodes do not exist." * * The caller resolves the real label from the model registry, so the label * interpolated here is always a registered one and never user input. The id * stays parameterised. */ bindContent(params: { assistantId: string; targetLabel: string; targetId: string; }): Promise; /** * Override delete to cascade through HAS_MESSAGE children so that * `AssistantMessage` nodes (and their REFERENCES edges) are removed with * the parent Assistant. DETACH DELETE drops every relationship incident to * the deleted nodes — including outgoing REFERENCES edges — without * affecting the referenced domain entities. */ delete(params: { id: string; }): Promise; } //# sourceMappingURL=assistant.repository.d.ts.map