"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.migrationRouter = void 0;
const express_1 = require("express");
const migration_1 = require("../controller/migration");
const evalDenormApi_1 = require("../controller/migration/evalDenormApi");
//import { validateUser } from '../middlewares/validateUser';
const router = (0, express_1.Router)();
// Project ID Migration
//router.post('/project-id', MigrationController.migrateProjectId);
// Dataset Records Migration
//router.post('/dataset-records', MigrationController.migrateDatasetRecords);
// Add ProjectId to Applications and TestRuns
router.post('/add-project-id', migration_1.MigrationController.addProjectId);
// Migrate Postgres applications -> ClickHouse applications table
router.post('/applications-to-clickhouse', migration_1.MigrationController.migrateApplicationsToClickhouse);
// Add a column to a ClickHouse table (DDL). Auth required; optional CLICKHOUSE_SCHEMA_ADMIN_SECRET + x-clickhouse-schema-secret.
router.post('/clickhouse/add-column', 
//validateUser,
migration_1.MigrationController.addClickhouseColumn);
// Truncate + reload guardrail_validators, guardrail_validator_categories, guardrail_actions from repo JSON.
router.post('/clickhouse/sync-guardrail-catalog', 
//validateUser,
migration_1.MigrationController.syncGuardrailCatalog);
// Copy Postgres eval_results -> ClickHouse eval_results (test_run_id from test_runs_to_evals).
router.post('/clickhouse/sync-eval-results-from-postgres', 
//validateUser,
migration_1.MigrationController.syncEvalResultsFromPostgresToClickhouse);
// Eval denorm: DDL + backfill (CH and PG). See docs/eval-results-analytics/HTTP_API.md
router.post('/eval-denorm/clickhouse/migrate', 
//validateUser,
evalDenormApi_1.EvalDenormMigrationApi.migrateClickhouse);
router.post('/eval-denorm/postgres/migrate', 
//validateUser,
evalDenormApi_1.EvalDenormMigrationApi.migratePostgres);
router.post('/eval-denorm/clickhouse/backfill', 
//validateUser,
evalDenormApi_1.EvalDenormMigrationApi.backfillClickhouse);
router.post('/eval-denorm/postgres/backfill', 
//validateUser,
evalDenormApi_1.EvalDenormMigrationApi.backfillPostgres);
router.get('/eval-denorm/backfills/:id', 
//validateUser,
evalDenormApi_1.EvalDenormMigrationApi.getBackfillStatus);
// Copy prompts from one library to another
router.post('/copy-prompts-between-libraries', migration_1.MigrationController.copyPromptsBetweenLibraries);
exports.migrationRouter = router;
//# sourceMappingURL=migration.js.map