import { AgentsManageDatabaseClient } from "../db/manage/manage-client.js";

//#region src/data-access/validation.d.ts

/**
 * Validates that a project exists before performing database operations
 * This provides runtime validation even when foreign key constraints are not enforced
 */
declare const validateProjectExists: (db: AgentsManageDatabaseClient, tenantId: string, projectId: string) => Promise<void>;
/**
 * Wraps a database operation with project validation
 * Ensures the project exists before executing the operation
 */
declare const withProjectValidation: <T extends (...args: any[]) => Promise<any>>(db: AgentsManageDatabaseClient, operation: T) => (params: Parameters<T>[0]) => Promise<ReturnType<T>>;
/**
 * Creates a validated version of data access functions
 * Automatically adds project validation to insert/update operations
 */
declare const createValidatedDataAccess: <T extends Record<string, any>>(db: AgentsManageDatabaseClient, dataAccessFunctions: T) => T;
//#endregion
export { createValidatedDataAccess, validateProjectExists, withProjectValidation };