import { agentDatasetRelations, agentEvaluatorRelations, dataset, datasetItem, datasetRunConfig, datasetRunConfigAgentRelations, datasetRunConfigEvaluatorRelations, evaluationJobConfig, evaluationJobConfigEvaluatorRelations, evaluationRunConfig, evaluationRunConfigEvaluationSuiteConfigRelations, evaluationSuiteConfig, evaluationSuiteConfigEvaluatorRelations, evaluator } from "../../db/manage/manage-schema.js";
import { datasetRun } from "../../db/runtime/runtime-schema.js";
import { projectScopedWhere } from "./scope-helpers.js";
import { and, eq, inArray, isNull, or } from "drizzle-orm";

//#region src/data-access/manage/evalConfig.ts
const getDatasetById = (db) => async (params) => {
	return (await db.select().from(dataset).where(and(projectScopedWhere(dataset, params.scopes), eq(dataset.id, params.scopes.datasetId))).limit(1))[0] ?? null;
};
const listDatasets = (db) => async (params) => {
	return await db.select().from(dataset).where(projectScopedWhere(dataset, params.scopes));
};
const createDataset = (db) => async (data) => {
	const now = (/* @__PURE__ */ new Date()).toISOString();
	const [created] = await db.insert(dataset).values({
		...data,
		createdAt: now,
		updatedAt: now
	}).returning();
	return created;
};
const updateDataset = (db) => async (params) => {
	const updateData = { updatedAt: (/* @__PURE__ */ new Date()).toISOString() };
	for (const [key, value] of Object.entries(params.data)) if (value !== void 0) updateData[key] = value;
	const [updated] = await db.update(dataset).set(updateData).where(and(projectScopedWhere(dataset, params.scopes), eq(dataset.id, params.scopes.datasetId))).returning();
	return updated ?? null;
};
const deleteDataset = (db) => async (params) => {
	return (await db.delete(dataset).where(and(projectScopedWhere(dataset, params.scopes), eq(dataset.id, params.scopes.datasetId))).returning()).length > 0;
};
const getDatasetItemById = (db) => async (params) => {
	return (await db.select().from(datasetItem).where(and(projectScopedWhere(datasetItem, params.scopes), eq(datasetItem.id, params.scopes.datasetItemId))).limit(1))[0] ?? null;
};
const listDatasetItems = (db) => async (params) => {
	return await db.select().from(datasetItem).where(and(projectScopedWhere(datasetItem, params.scopes), eq(datasetItem.datasetId, params.scopes.datasetId)));
};
const createDatasetItem = (db) => async (data) => {
	const now = (/* @__PURE__ */ new Date()).toISOString();
	const [created] = await db.insert(datasetItem).values({
		...data,
		createdAt: now,
		updatedAt: now
	}).returning();
	return created;
};
const createDatasetItems = (db) => async (data) => {
	const now = (/* @__PURE__ */ new Date()).toISOString();
	const values = data.map((item) => ({
		...item,
		createdAt: now,
		updatedAt: now
	}));
	return await db.insert(datasetItem).values(values).returning();
};
const updateDatasetItem = (db) => async (params) => {
	const updateData = { updatedAt: (/* @__PURE__ */ new Date()).toISOString() };
	for (const [key, value] of Object.entries(params.data)) if (value !== void 0) updateData[key] = value;
	const [updated] = await db.update(datasetItem).set(updateData).where(and(projectScopedWhere(datasetItem, params.scopes), eq(datasetItem.id, params.scopes.datasetItemId))).returning();
	return updated ?? null;
};
const deleteDatasetItem = (db) => async (params) => {
	return (await db.delete(datasetItem).where(and(projectScopedWhere(datasetItem, params.scopes), eq(datasetItem.id, params.scopes.datasetItemId))).returning()).length > 0;
};
const deleteDatasetItemsByDataset = (db) => async (params) => {
	return (await db.delete(datasetItem).where(and(projectScopedWhere(datasetItem, params.scopes), eq(datasetItem.datasetId, params.scopes.datasetId))).returning()).length;
};
const getDatasetRunConfigById = (db) => async (params) => {
	return (await db.select().from(datasetRunConfig).where(and(projectScopedWhere(datasetRunConfig, params.scopes), eq(datasetRunConfig.id, params.scopes.datasetRunConfigId))).limit(1))[0] ?? null;
};
const listDatasetRunConfigs = (db) => async (params) => {
	return await db.select().from(datasetRunConfig).where(projectScopedWhere(datasetRunConfig, params.scopes));
};
const createDatasetRunConfig = (db) => async (data) => {
	const now = (/* @__PURE__ */ new Date()).toISOString();
	const [created] = await db.insert(datasetRunConfig).values({
		...data,
		createdAt: now,
		updatedAt: now
	}).returning();
	return created;
};
const updateDatasetRunConfig = (db) => async (params) => {
	const updateData = { updatedAt: (/* @__PURE__ */ new Date()).toISOString() };
	for (const [key, value] of Object.entries(params.data)) if (value !== void 0) updateData[key] = value;
	const [updated] = await db.update(datasetRunConfig).set(updateData).where(and(projectScopedWhere(datasetRunConfig, params.scopes), eq(datasetRunConfig.id, params.scopes.datasetRunConfigId))).returning();
	return updated ?? null;
};
const deleteDatasetRunConfig = (db) => async (params) => {
	return (await db.delete(datasetRunConfig).where(and(projectScopedWhere(datasetRunConfig, params.scopes), eq(datasetRunConfig.id, params.scopes.datasetRunConfigId))).returning()).length > 0;
};
const getDatasetRunConfigAgentRelations = (db) => async (params) => {
	return await db.select().from(datasetRunConfigAgentRelations).where(and(projectScopedWhere(datasetRunConfigAgentRelations, params.scopes), eq(datasetRunConfigAgentRelations.datasetRunConfigId, params.scopes.datasetRunConfigId)));
};
const createDatasetRunConfigAgentRelation = (db) => async (data) => {
	const now = (/* @__PURE__ */ new Date()).toISOString();
	const [created] = await db.insert(datasetRunConfigAgentRelations).values({
		...data,
		createdAt: now,
		updatedAt: now
	}).returning();
	return created;
};
const deleteDatasetRunConfigAgentRelation = (db) => async (params) => {
	return (await db.delete(datasetRunConfigAgentRelations).where(and(projectScopedWhere(datasetRunConfigAgentRelations, params.scopes), eq(datasetRunConfigAgentRelations.datasetRunConfigId, params.scopes.datasetRunConfigId), eq(datasetRunConfigAgentRelations.agentId, params.scopes.agentId))).returning()).length > 0;
};
const getDatasetRunConfigEvaluatorRelations = (db) => async (params) => {
	return await db.select().from(datasetRunConfigEvaluatorRelations).where(and(projectScopedWhere(datasetRunConfigEvaluatorRelations, params.scopes), eq(datasetRunConfigEvaluatorRelations.datasetRunConfigId, params.scopes.datasetRunConfigId)));
};
const createDatasetRunConfigEvaluatorRelation = (db) => async (data) => {
	const now = (/* @__PURE__ */ new Date()).toISOString();
	const [created] = await db.insert(datasetRunConfigEvaluatorRelations).values({
		...data,
		createdAt: now,
		updatedAt: now
	}).returning();
	return created;
};
const deleteDatasetRunConfigEvaluatorRelation = (db) => async (params) => {
	return (await db.delete(datasetRunConfigEvaluatorRelations).where(and(projectScopedWhere(datasetRunConfigEvaluatorRelations, params.scopes), eq(datasetRunConfigEvaluatorRelations.datasetRunConfigId, params.scopes.datasetRunConfigId), eq(datasetRunConfigEvaluatorRelations.evaluatorId, params.scopes.evaluatorId))).returning()).length > 0;
};
const deleteDatasetRunConfigEvaluatorRelationsByConfigId = (db) => async (params) => {
	await db.delete(datasetRunConfigEvaluatorRelations).where(and(projectScopedWhere(datasetRunConfigEvaluatorRelations, params.scopes), eq(datasetRunConfigEvaluatorRelations.datasetRunConfigId, params.scopes.datasetRunConfigId)));
};
const getEvaluatorById = (db) => async (params) => {
	return (await db.select().from(evaluator).where(and(projectScopedWhere(evaluator, params.scopes), eq(evaluator.id, params.scopes.evaluatorId))).limit(1))[0] ?? null;
};
const listEvaluators = (db) => async (params) => {
	return await db.select().from(evaluator).where(projectScopedWhere(evaluator, params.scopes));
};
const getEvaluatorsByIds = (db) => async (params) => {
	if (params.evaluatorIds.length === 0) return [];
	return await db.select().from(evaluator).where(and(projectScopedWhere(evaluator, params.scopes), inArray(evaluator.id, params.evaluatorIds)));
};
const createEvaluator = (db) => async (data) => {
	const now = (/* @__PURE__ */ new Date()).toISOString();
	const [created] = await db.insert(evaluator).values({
		...data,
		createdAt: now,
		updatedAt: now
	}).returning();
	return created;
};
const updateEvaluator = (db) => async (params) => {
	const updateData = { updatedAt: (/* @__PURE__ */ new Date()).toISOString() };
	for (const [key, value] of Object.entries(params.data)) if (value !== void 0) updateData[key] = value;
	const [updated] = await db.update(evaluator).set(updateData).where(and(projectScopedWhere(evaluator, params.scopes), eq(evaluator.id, params.scopes.evaluatorId))).returning();
	return updated ?? null;
};
const deleteEvaluator = (db) => async (params) => {
	return (await db.delete(evaluator).where(and(projectScopedWhere(evaluator, params.scopes), eq(evaluator.id, params.scopes.evaluatorId))).returning()).length > 0;
};
const getEvaluationSuiteConfigById = (db) => async (params) => {
	return (await db.select().from(evaluationSuiteConfig).where(and(projectScopedWhere(evaluationSuiteConfig, params.scopes), eq(evaluationSuiteConfig.id, params.scopes.evaluationSuiteConfigId))).limit(1))[0] ?? null;
};
const listEvaluationSuiteConfigs = (db) => async (params) => {
	return await db.select().from(evaluationSuiteConfig).where(projectScopedWhere(evaluationSuiteConfig, params.scopes));
};
const createEvaluationSuiteConfig = (db) => async (data) => {
	const now = (/* @__PURE__ */ new Date()).toISOString();
	const [created] = await db.insert(evaluationSuiteConfig).values({
		...data,
		createdAt: now,
		updatedAt: now
	}).returning();
	return created;
};
const updateEvaluationSuiteConfig = (db) => async (params) => {
	const updateData = { updatedAt: (/* @__PURE__ */ new Date()).toISOString() };
	for (const [key, value] of Object.entries(params.data)) if (value !== void 0) updateData[key] = value;
	const [updated] = await db.update(evaluationSuiteConfig).set(updateData).where(and(projectScopedWhere(evaluationSuiteConfig, params.scopes), eq(evaluationSuiteConfig.id, params.scopes.evaluationSuiteConfigId))).returning();
	return updated ?? null;
};
const deleteEvaluationSuiteConfig = (db) => async (params) => {
	return (await db.delete(evaluationSuiteConfig).where(and(projectScopedWhere(evaluationSuiteConfig, params.scopes), eq(evaluationSuiteConfig.id, params.scopes.evaluationSuiteConfigId))).returning()).length > 0;
};
const getEvaluationSuiteConfigEvaluatorRelations = (db) => async (params) => {
	return await db.select().from(evaluationSuiteConfigEvaluatorRelations).where(and(projectScopedWhere(evaluationSuiteConfigEvaluatorRelations, params.scopes), eq(evaluationSuiteConfigEvaluatorRelations.evaluationSuiteConfigId, params.scopes.evaluationSuiteConfigId)));
};
const createEvaluationSuiteConfigEvaluatorRelation = (db) => async (data) => {
	const now = (/* @__PURE__ */ new Date()).toISOString();
	const [created] = await db.insert(evaluationSuiteConfigEvaluatorRelations).values({
		...data,
		createdAt: now,
		updatedAt: now
	}).returning();
	return created;
};
const deleteEvaluationSuiteConfigEvaluatorRelation = (db) => async (params) => {
	return (await db.delete(evaluationSuiteConfigEvaluatorRelations).where(and(projectScopedWhere(evaluationSuiteConfigEvaluatorRelations, params.scopes), eq(evaluationSuiteConfigEvaluatorRelations.evaluationSuiteConfigId, params.scopes.evaluationSuiteConfigId), eq(evaluationSuiteConfigEvaluatorRelations.evaluatorId, params.scopes.evaluatorId))).returning()).length > 0;
};
const deleteEvaluationSuiteConfigEvaluatorRelationsByEvaluator = (db) => async (params) => {
	return (await db.delete(evaluationSuiteConfigEvaluatorRelations).where(and(projectScopedWhere(evaluationSuiteConfigEvaluatorRelations, params.scopes), eq(evaluationSuiteConfigEvaluatorRelations.evaluatorId, params.scopes.evaluatorId))).returning()).length;
};
const getEvaluationRunConfigById = (db) => async (params) => {
	return (await db.select().from(evaluationRunConfig).where(and(projectScopedWhere(evaluationRunConfig, params.scopes), eq(evaluationRunConfig.id, params.scopes.evaluationRunConfigId))).limit(1))[0] ?? null;
};
const listEvaluationRunConfigs = (db) => async (params) => {
	return await db.select().from(evaluationRunConfig).where(projectScopedWhere(evaluationRunConfig, params.scopes));
};
const listEvaluationRunConfigsWithSuiteConfigs = (db) => async (params) => {
	const rows = await db.select({
		runConfig: evaluationRunConfig,
		suiteConfigId: evaluationRunConfigEvaluationSuiteConfigRelations.evaluationSuiteConfigId
	}).from(evaluationRunConfig).leftJoin(evaluationRunConfigEvaluationSuiteConfigRelations, and(eq(evaluationRunConfigEvaluationSuiteConfigRelations.tenantId, evaluationRunConfig.tenantId), eq(evaluationRunConfigEvaluationSuiteConfigRelations.projectId, evaluationRunConfig.projectId), eq(evaluationRunConfigEvaluationSuiteConfigRelations.evaluationRunConfigId, evaluationRunConfig.id))).where(projectScopedWhere(evaluationRunConfig, params.scopes));
	const runConfigsById = /* @__PURE__ */ new Map();
	for (const row of rows) {
		const runConfig = row.runConfig;
		const runConfigId = runConfig.id;
		if (!runConfigsById.has(runConfigId)) {
			const { tenantId: _tenantId, projectId: _projectId, ...apiRunConfig } = runConfig;
			runConfigsById.set(runConfigId, {
				...apiRunConfig,
				suiteConfigIds: []
			});
		}
		if (row.suiteConfigId) runConfigsById.get(runConfigId)?.suiteConfigIds.push(row.suiteConfigId);
	}
	return Array.from(runConfigsById.values());
};
const createEvaluationRunConfig = (db) => async (data) => {
	const now = (/* @__PURE__ */ new Date()).toISOString();
	const [created] = await db.insert(evaluationRunConfig).values({
		...data,
		createdAt: now,
		updatedAt: now
	}).returning();
	return created;
};
const updateEvaluationRunConfig = (db) => async (params) => {
	const updateData = { updatedAt: (/* @__PURE__ */ new Date()).toISOString() };
	for (const [key, value] of Object.entries(params.data)) if (value !== void 0) updateData[key] = value;
	const [updated] = await db.update(evaluationRunConfig).set(updateData).where(and(projectScopedWhere(evaluationRunConfig, params.scopes), eq(evaluationRunConfig.id, params.scopes.evaluationRunConfigId))).returning();
	return updated ?? null;
};
const deleteEvaluationRunConfig = (db) => async (params) => {
	return (await db.delete(evaluationRunConfig).where(and(projectScopedWhere(evaluationRunConfig, params.scopes), eq(evaluationRunConfig.id, params.scopes.evaluationRunConfigId))).returning()).length > 0;
};
const getEvaluationRunConfigEvaluationSuiteConfigRelations = (db) => async (params) => {
	return await db.select().from(evaluationRunConfigEvaluationSuiteConfigRelations).where(and(projectScopedWhere(evaluationRunConfigEvaluationSuiteConfigRelations, params.scopes), eq(evaluationRunConfigEvaluationSuiteConfigRelations.evaluationRunConfigId, params.scopes.evaluationRunConfigId)));
};
const createEvaluationRunConfigEvaluationSuiteConfigRelation = (db) => async (data) => {
	const now = (/* @__PURE__ */ new Date()).toISOString();
	const [created] = await db.insert(evaluationRunConfigEvaluationSuiteConfigRelations).values({
		...data,
		createdAt: now,
		updatedAt: now
	}).returning();
	return created;
};
const deleteEvaluationRunConfigEvaluationSuiteConfigRelation = (db) => async (params) => {
	return (await db.delete(evaluationRunConfigEvaluationSuiteConfigRelations).where(and(projectScopedWhere(evaluationRunConfigEvaluationSuiteConfigRelations, params.scopes), eq(evaluationRunConfigEvaluationSuiteConfigRelations.evaluationRunConfigId, params.scopes.evaluationRunConfigId), eq(evaluationRunConfigEvaluationSuiteConfigRelations.evaluationSuiteConfigId, params.scopes.evaluationSuiteConfigId))).returning()).length > 0;
};
const getEvaluationJobConfigById = (db) => async (params) => {
	return (await db.select().from(evaluationJobConfig).where(and(projectScopedWhere(evaluationJobConfig, params.scopes), eq(evaluationJobConfig.id, params.scopes.evaluationJobConfigId))).limit(1))[0] ?? null;
};
const listEvaluationJobConfigs = (db) => async (params) => {
	return await db.select().from(evaluationJobConfig).where(projectScopedWhere(evaluationJobConfig, params.scopes));
};
const createEvaluationJobConfig = (db) => async (data) => {
	const now = (/* @__PURE__ */ new Date()).toISOString();
	const [created] = await db.insert(evaluationJobConfig).values({
		...data,
		createdAt: now,
		updatedAt: now
	}).returning();
	return created;
};
const deleteEvaluationJobConfig = (db) => async (params) => {
	return (await db.delete(evaluationJobConfig).where(and(projectScopedWhere(evaluationJobConfig, params.scopes), eq(evaluationJobConfig.id, params.scopes.evaluationJobConfigId))).returning()).length > 0;
};
const getEvaluationJobConfigEvaluatorRelations = (db) => async (params) => {
	return await db.select().from(evaluationJobConfigEvaluatorRelations).where(and(projectScopedWhere(evaluationJobConfigEvaluatorRelations, params.scopes), eq(evaluationJobConfigEvaluatorRelations.evaluationJobConfigId, params.scopes.evaluationJobConfigId)));
};
const createEvaluationJobConfigEvaluatorRelation = (db) => async (data) => {
	const now = (/* @__PURE__ */ new Date()).toISOString();
	const [created] = await db.insert(evaluationJobConfigEvaluatorRelations).values({
		...data,
		createdAt: now,
		updatedAt: now
	}).returning();
	return created;
};
const deleteEvaluationJobConfigEvaluatorRelation = (db) => async (params) => {
	return (await db.delete(evaluationJobConfigEvaluatorRelations).where(and(projectScopedWhere(evaluationJobConfigEvaluatorRelations, params.scopes), eq(evaluationJobConfigEvaluatorRelations.evaluationJobConfigId, params.scopes.evaluationJobConfigId), eq(evaluationJobConfigEvaluatorRelations.evaluatorId, params.scopes.evaluatorId))).returning()).length > 0;
};
const deleteEvaluationJobConfigEvaluatorRelationsByEvaluator = (db) => async (params) => {
	return (await db.delete(evaluationJobConfigEvaluatorRelations).where(and(projectScopedWhere(evaluationJobConfigEvaluatorRelations, params.scopes), eq(evaluationJobConfigEvaluatorRelations.evaluatorId, params.scopes.evaluatorId))).returning()).length;
};
const linkDatasetRunToEvaluationJobConfig = (db) => async (params) => {
	await db.update(datasetRun).set({ evaluationJobConfigId: params.evaluationJobConfigId }).where(and(projectScopedWhere(datasetRun, params.scopes), eq(datasetRun.id, params.scopes.datasetRunId)));
};
const getAgentDatasetRelationsByAgent = (db) => async (params) => {
	return await db.select().from(agentDatasetRelations).where(and(projectScopedWhere(agentDatasetRelations, params.scopes), eq(agentDatasetRelations.agentId, params.scopes.agentId)));
};
const getAgentDatasetRelationsByDataset = (db) => async (params) => {
	return await db.select().from(agentDatasetRelations).where(and(projectScopedWhere(agentDatasetRelations, params.scopes), eq(agentDatasetRelations.datasetId, params.scopes.datasetId)));
};
const createAgentDatasetRelation = (db) => async (data) => {
	const now = (/* @__PURE__ */ new Date()).toISOString();
	const [created] = await db.insert(agentDatasetRelations).values({
		...data,
		createdAt: now,
		updatedAt: now
	}).returning();
	return created;
};
const deleteAgentDatasetRelation = (db) => async (params) => {
	return (await db.delete(agentDatasetRelations).where(and(projectScopedWhere(agentDatasetRelations, params.scopes), eq(agentDatasetRelations.agentId, params.scopes.agentId), eq(agentDatasetRelations.datasetId, params.scopes.datasetId))).returning()).length > 0;
};
const getAgentEvaluatorRelationsByAgent = (db) => async (params) => {
	return await db.select().from(agentEvaluatorRelations).where(and(projectScopedWhere(agentEvaluatorRelations, params.scopes), eq(agentEvaluatorRelations.agentId, params.scopes.agentId)));
};
const getAgentEvaluatorRelationsByEvaluator = (db) => async (params) => {
	return await db.select().from(agentEvaluatorRelations).where(and(projectScopedWhere(agentEvaluatorRelations, params.scopes), eq(agentEvaluatorRelations.evaluatorId, params.scopes.evaluatorId)));
};
const createAgentEvaluatorRelation = (db) => async (data) => {
	const now = (/* @__PURE__ */ new Date()).toISOString();
	const [created] = await db.insert(agentEvaluatorRelations).values({
		...data,
		createdAt: now,
		updatedAt: now
	}).returning();
	return created;
};
const deleteAgentEvaluatorRelation = (db) => async (params) => {
	return (await db.delete(agentEvaluatorRelations).where(and(projectScopedWhere(agentEvaluatorRelations, params.scopes), eq(agentEvaluatorRelations.agentId, params.scopes.agentId), eq(agentEvaluatorRelations.evaluatorId, params.scopes.evaluatorId))).returning()).length > 0;
};
const listDatasetsForAgent = (db) => async (params) => {
	const { scopes, agentId } = params;
	return (await db.select({ dataset }).from(dataset).leftJoin(agentDatasetRelations, and(eq(dataset.tenantId, agentDatasetRelations.tenantId), eq(dataset.projectId, agentDatasetRelations.projectId), eq(dataset.id, agentDatasetRelations.datasetId))).where(and(projectScopedWhere(dataset, scopes), or(isNull(agentDatasetRelations.agentId), eq(agentDatasetRelations.agentId, agentId))))).map((r) => r.dataset);
};
const listEvaluatorsForAgent = (db) => async (params) => {
	const { scopes, agentId } = params;
	return (await db.select({ evaluator }).from(evaluator).leftJoin(agentEvaluatorRelations, and(eq(evaluator.tenantId, agentEvaluatorRelations.tenantId), eq(evaluator.projectId, agentEvaluatorRelations.projectId), eq(evaluator.id, agentEvaluatorRelations.evaluatorId))).where(and(projectScopedWhere(evaluator, scopes), or(isNull(agentEvaluatorRelations.agentId), eq(agentEvaluatorRelations.agentId, agentId))))).map((r) => r.evaluator);
};
const getAgentIdsForEvaluators = (db) => async (params) => {
	if (params.evaluatorIds.length === 0) return /* @__PURE__ */ new Map();
	const rows = await db.select({
		evaluatorId: agentEvaluatorRelations.evaluatorId,
		agentId: agentEvaluatorRelations.agentId
	}).from(agentEvaluatorRelations).where(and(projectScopedWhere(agentEvaluatorRelations, params.scopes), inArray(agentEvaluatorRelations.evaluatorId, params.evaluatorIds)));
	const result = /* @__PURE__ */ new Map();
	for (const row of rows) {
		const existing = result.get(row.evaluatorId) ?? [];
		existing.push(row.agentId);
		result.set(row.evaluatorId, existing);
	}
	return result;
};

//#endregion
export { createAgentDatasetRelation, createAgentEvaluatorRelation, createDataset, createDatasetItem, createDatasetItems, createDatasetRunConfig, createDatasetRunConfigAgentRelation, createDatasetRunConfigEvaluatorRelation, createEvaluationJobConfig, createEvaluationJobConfigEvaluatorRelation, createEvaluationRunConfig, createEvaluationRunConfigEvaluationSuiteConfigRelation, createEvaluationSuiteConfig, createEvaluationSuiteConfigEvaluatorRelation, createEvaluator, deleteAgentDatasetRelation, deleteAgentEvaluatorRelation, deleteDataset, deleteDatasetItem, deleteDatasetItemsByDataset, deleteDatasetRunConfig, deleteDatasetRunConfigAgentRelation, deleteDatasetRunConfigEvaluatorRelation, deleteDatasetRunConfigEvaluatorRelationsByConfigId, deleteEvaluationJobConfig, deleteEvaluationJobConfigEvaluatorRelation, deleteEvaluationJobConfigEvaluatorRelationsByEvaluator, deleteEvaluationRunConfig, deleteEvaluationRunConfigEvaluationSuiteConfigRelation, deleteEvaluationSuiteConfig, deleteEvaluationSuiteConfigEvaluatorRelation, deleteEvaluationSuiteConfigEvaluatorRelationsByEvaluator, deleteEvaluator, getAgentDatasetRelationsByAgent, getAgentDatasetRelationsByDataset, getAgentEvaluatorRelationsByAgent, getAgentEvaluatorRelationsByEvaluator, getAgentIdsForEvaluators, getDatasetById, getDatasetItemById, getDatasetRunConfigAgentRelations, getDatasetRunConfigById, getDatasetRunConfigEvaluatorRelations, getEvaluationJobConfigById, getEvaluationJobConfigEvaluatorRelations, getEvaluationRunConfigById, getEvaluationRunConfigEvaluationSuiteConfigRelations, getEvaluationSuiteConfigById, getEvaluationSuiteConfigEvaluatorRelations, getEvaluatorById, getEvaluatorsByIds, linkDatasetRunToEvaluationJobConfig, listDatasetItems, listDatasetRunConfigs, listDatasets, listDatasetsForAgent, listEvaluationJobConfigs, listEvaluationRunConfigs, listEvaluationRunConfigsWithSuiteConfigs, listEvaluationSuiteConfigs, listEvaluators, listEvaluatorsForAgent, updateDataset, updateDatasetItem, updateDatasetRunConfig, updateEvaluationRunConfig, updateEvaluationSuiteConfig, updateEvaluator };