import { type Kysely } from 'kysely'; import type { ResolvedModel } from '../schema/types.js'; import type { SchemaRegistry } from '../schema/registry.js'; import type { RequestContext } from '../auth/types.js'; import type { ModelOps, QueryState, QueryResult, QueryResultWithMeta } from '../model-api/types.js'; interface DbLike { selectFrom(table: string): any; insertInto(table: string): any; updateTable(table: string): any; deleteFrom(table: string): any; } export interface KyselyModelOpsConfig { db: Kysely | DbLike; model: ResolvedModel; registry: SchemaRegistry; auth?: RequestContext; tableName?: string; } export declare class KyselyModelOps implements ModelOps { private readonly db; private readonly model; private readonly registry; private readonly defaultAuth?; private readonly tableName; constructor(config: KyselyModelOpsConfig); find(state: QueryState): Promise; findWithMeta(state: QueryState): Promise; findOne(state: QueryState): Promise | null>; count(state: QueryState): Promise; get(id: string): Promise | null>; create(data: Record, _auth?: RequestContext): Promise>; update(id: string, data: Record, _auth?: RequestContext): Promise>; delete(id: string, _auth?: RequestContext): Promise>; withTransaction(trx: unknown): ModelOps; compile(state: QueryState): unknown; compileCount(state: QueryState): unknown; private buildBaseQuery; private applySelect; private applySorts; private applyPagination; private assignSequenceValues; private cascadeDeleteChildren; private getOrThrow; } export {}; //# sourceMappingURL=model-ops.d.ts.map