import { NamespaceAdapter } from '../index.mjs'; type PrismaClient = { [key: string]: { findFirst: (args: { where: Record; select?: Record; }) => Promise | null>; }; }; /** * Create a namespace adapter for Prisma * * @example * ```ts * import { PrismaClient } from "@prisma/client"; * import { createNamespaceGuard } from "namespace-guard"; * import { createPrismaAdapter } from "namespace-guard/adapters/prisma"; * * const prisma = new PrismaClient(); * * const guard = createNamespaceGuard( * { * reserved: ["admin", "api", "settings"], * sources: [ * { name: "user", column: "handle", scopeKey: "userId" }, * { name: "organization", column: "slug", scopeKey: "orgId" }, * ], * }, * createPrismaAdapter(prisma) * ); * ``` */ declare function createPrismaAdapter(prisma: PrismaClient): NamespaceAdapter; export { createPrismaAdapter };