/**
 * Structural Prisma client surface for the models cms-core ships.
 *
 * cms-core never imports a generated PrismaClient — consumers generate their
 * own client (from a schema that is a superset of cms-core's) and hand it to
 * `initDB()`. These types describe the subset of that client cms-core relies
 * on, so internal code gets real model/delegate checking without coupling the
 * package build to `prisma generate`.
 *
 * Two deliberate design points:
 *
 * 1. Query ARGUMENTS stay loose (`QueryArgs`). Reproducing Prisma's generic
 *    where/select/include inference by hand is not maintainable; the win we
 *    are buying is typed delegate names, method names, and row shapes.
 * 2. Everything here must stay NARROWER than the real generated client. The
 *    e2e suite generates the actual client from the canonical schema and
 *    asserts `PrismaClient` is assignable to `ActuateDB`, so any drift
 *    (renamed model, wrong delegate name, bogus row field) fails CI.
 */
import type { ActuateModelMap } from './model-types.js';
/**
 * Prisma query arguments (where/select/include/orderBy/...).
 *
 * Deliberately `any`: the real generated delegates take strictly-typed,
 * generic argument interfaces, and TypeScript checks parameters
 * contravariantly — any narrower type here would make the real PrismaClient
 * NOT assignable to `ActuateDB` and break the e2e assignability guard. The
 * type-safety this surface buys is delegate names, method names, and row
 * result shapes, not argument shapes.
 */
export type QueryArgs = any;
/** The per-model CRUD surface cms-core uses. Methods (not function properties)
 * so parameter bivariance lets the strictly-generic real client satisfy it. */
export interface ModelDelegate<Row> {
    findMany(args?: QueryArgs): Promise<Row[]>;
    findFirst(args?: QueryArgs): Promise<Row | null>;
    findUnique(args: QueryArgs): Promise<Row | null>;
    findFirstOrThrow(args?: QueryArgs): Promise<Row>;
    findUniqueOrThrow(args: QueryArgs): Promise<Row>;
    create(args: QueryArgs): Promise<Row>;
    createMany(args: QueryArgs): Promise<{
        count: number;
    }>;
    update(args: QueryArgs): Promise<Row>;
    updateMany(args: QueryArgs): Promise<{
        count: number;
    }>;
    upsert(args: QueryArgs): Promise<Row>;
    delete(args: QueryArgs): Promise<Row>;
    deleteMany(args?: QueryArgs): Promise<{
        count: number;
    }>;
    count(args?: QueryArgs): Promise<number>;
    aggregate(args: QueryArgs): Promise<any>;
    groupBy(args: QueryArgs): Promise<any[]>;
}
/** Client-level methods cms-core uses ($transaction, raw SQL, lifecycle). */
export interface ClientMethods {
    $transaction(arg: any, options?: any): Promise<any>;
    $queryRaw(...args: any[]): Promise<any>;
    $queryRawUnsafe(query: string, ...params: any[]): Promise<any>;
    $executeRaw(...args: any[]): Promise<number>;
    $executeRawUnsafe(query: string, ...params: any[]): Promise<number>;
    $connect(): Promise<void>;
    $disconnect(): Promise<void>;
}
/**
 * The structural database client cms-core codes against: one typed delegate
 * per shipped model plus the client-level `$` methods. Any consumer-generated
 * PrismaClient whose schema includes cms-core's models satisfies this type.
 */
export type ActuateDB = {
    [K in keyof ActuateModelMap]: ModelDelegate<ActuateModelMap[K]>;
} & ClientMethods;
//# sourceMappingURL=client-types.d.ts.map