import type { JoinOptions, JoinResolver } from '@nestjs-crud/core'; import type { QueryJoin } from '@nestjs-crud/request'; export interface PrismaJoinResolverConfig { relationFields: string[]; allowedColumnsByRelation: Record; } /** * Resolves relation allowlists for PrismaQueryComposer's SQLi guard. * * Prisma uses `include` (not SQL JOIN) for relation traversal, so `applyJoins` * is intentionally not needed here — include blocks are assembled inside * `PrismaQueryComposer.getIncludeObject`. This resolver's job is purely to * provide the dotted-path sort allowlist (SQLi mitigation surface). * * @since 2.0.0 */ export declare class PrismaJoinResolver implements JoinResolver { private readonly config; constructor(config: PrismaJoinResolverConfig); /** * Return the allowed column name set for a given relation name. * Returns an empty Set for unknown relations — callers must check `.size` * and reject before any identifier reaches Prisma's orderBy. * SQLi mitigation surface. */ getAllowedColumnsFor(relation: string): ReadonlySet; /** * Returns true if the relation name is in the known relation fields list. */ isKnownRelation(relation: string): boolean; /** * Not needed for Prisma — relation navigation happens via `include` in * PrismaQueryComposer, not via SQL JOIN. This method satisfies the * JoinResolver interface contract but is never called by the Prisma adapter. * * @internal */ applyJoins(_query: any, _joins: QueryJoin[], _joinOptions: JoinOptions): any; }