import { G as GQPAdapter, n as GQPNode, Q as QueryFilters, b as QueryOptions } from '../../types-CqJN-Ev5.js'; /** * Prisma Adapter for GQP * Introspects Prisma schema and translates GQP queries to Prisma operations */ /** * Prisma adapter configuration */ interface PrismaAdapterConfig { /** Models to include (if not specified, all models are included) */ include?: string[]; /** Models to exclude */ exclude?: string[]; /** Custom descriptions for models */ descriptions?: Record; /** Models to treat as root nodes (entry points) */ rootNodes?: string[]; } /** * Prisma Adapter Implementation */ declare class PrismaAdapter implements GQPAdapter { name: string; private client; private config; private dmmf; private enumMap; constructor(prismaClient: unknown, config?: PrismaAdapterConfig); /** * Introspect Prisma schema and return GQP nodes */ introspect(): Promise; /** * Execute a query against Prisma */ execute(nodeName: string, filters: QueryFilters, options: QueryOptions): Promise; /** * Build safe includes with depth limiting */ private buildSafeIncludes; /** * Get total count for a query */ count(nodeName: string, filters: QueryFilters): Promise; /** * Get Prisma DMMF (Data Model Meta Format) */ private getDMMF; /** * Get Prisma model accessor */ private getModel; /** * Convert model name to Prisma accessor name */ private getModelName; /** * Convert Prisma model to GQP node */ private modelToNode; /** * Convert Prisma field to GQP field */ private fieldToGQPField; /** * Convert Prisma relation to GQP edge */ private fieldToEdge; /** * Map Prisma type to GQP FieldType */ private mapPrismaType; /** * Add capabilities based on field type */ private addCapabilitiesForField; private static SAFE_OPERATORS; /** * Translate GQP filters to Prisma where clause */ private translateFilters; } /** * Factory function to create Prisma adapter * * @example * ```typescript * import { GQP } from '@mzhub/gqp'; * import { fromPrisma } from '@mzhub/gqp/prisma'; * import { prisma } from './db'; * * const graph = new GQP({ * sources: { * database: fromPrisma(prisma, { * include: ['User', 'Order', 'Product'], * exclude: ['_migrations'] * }) * } * }); * ``` */ declare function fromPrisma(prismaClient: unknown, config?: PrismaAdapterConfig): GQPAdapter; export { PrismaAdapter, type PrismaAdapterConfig, fromPrisma };