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 { UserActivity, UserActivityDescriptor } from "../entities/user-activity"; import { UserActivityRecordInput } from "../interfaces/user-activity.record.input"; export declare class UserActivityRepository extends AbstractRepository { protected readonly descriptor: import("../../..").EntityDescriptor; constructor(neo4j: Neo4jService, securityService: SecurityService, clsService: ClsService); /** * Adds the activity-log-specific indexes (recent-activity scan by * createdAt, category+action lookups) on top of the id constraint that * AbstractRepository already creates from the descriptor. There is no * declarative way to express a plain (non-FULLTEXT) composite index via * defineEntity(), so these stay as an explicit override — mirrors the * canonical pattern for repositories that need a bespoke index * (e.g. a vector index) alongside the descriptor-derived constraints. */ onModuleInit(): Promise; /** * Records are written from the async BullMQ worker (see * UserActivityProcessor), outside HTTP/CLS request context, so this stays a * fully custom Cypher write (explicit userId/companyId params, explicit * MATCH on both Company and User) rather than the inherited * descriptor-driven create(), which expects CLS-derived company scoping. * The explicit `(userActivity)-[:BELONGS_TO]->(company)` edge below is the * deliberate, documented exception to buildDefaultMatch()-driven company * scoping: there is no CLS company to derive at write time. * Not renamed: the params shape is domain-specific (UserActivityRecordInput, * not the generic `{id, [key: string]: any}`), which is allowed to coexist * under the base class's bivariant method-parameter checking. */ createActivity(input: UserActivityRecordInput): Promise; /** * Fully custom traversal (by PERFORMED edge + date range), not expressible * via the inherited findByRelated() because `user` is intentionally not a * descriptor relationship (see entities/user-activity.ts) and the date * filtering is bespoke. */ findByUser(params: { userId: string; from?: Date; to?: Date; limit?: number; }): Promise; } //# sourceMappingURL=user-activity.repository.d.ts.map