"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const express_1 = require("express");
const ai_controller_1 = require("../controllers/ai.controller");
/**
 * Router for AI-powered task management endpoints
 */
const router = (0, express_1.Router)();
/**
 * @route   POST /api/ai/create-task
 * @desc    Create a task from natural language input
 * @access  Private
 * @body    {
 *            prompt: string,
 *            projectId?: string,
 *            context?: {
 *              currentTasks?: string[],
 *              completedTasks?: string[],
 *              projectDescription?: string,
 *              userRole?: string
 *            }
 *          }
 */
router.post('/create-task', (req, res, next) => ai_controller_1.aiController.createTask(req, res, next));
/**
 * @route   PUT /api/ai/update-context/:taskId
 * @desc    Update AI context for a task with user feedback
 * @access  Private
 * @params  taskId - The ID of the task to update
 * @body    { feedback: string }
 */
router.put('/update-context/:taskId', (req, res, next) => ai_controller_1.aiController.updateTaskContext(req, res, next));
/**
 * @route   GET /api/ai/suggestions/:projectId
 * @desc    Get AI-powered task suggestions for a project
 * @access  Private
 * @params  projectId - The ID of the project
 * @query   {
 *            projectDescription: string,
 *            completedTasks: string (comma-separated),
 *            currentTasks: string (comma-separated),
 *            goals: string (comma-separated)
 *          }
 */
router.get('/suggestions/:projectId', (req, res, next) => ai_controller_1.aiController.getTaskSuggestions(req, res, next));
/**
 * @route   POST /api/ai/breakdown/:taskId
 * @desc    Break down a task into subtasks using AI
 * @access  Private
 * @params  taskId - The ID of the task to break down
 * @body    {
 *            taskDescription: string,
 *            context?: string
 *          }
 */
router.post('/breakdown/:taskId', (req, res, next) => ai_controller_1.aiController.breakdownTask(req, res, next));
/**
 * @route   GET /api/ai/health
 * @desc    Check health status of AI services
 * @access  Private
 */
router.get('/health', (req, res, next) => ai_controller_1.aiController.getHealthStatus(req, res, next));
/**
 * @route   GET /api/ai/usage
 * @desc    Get usage statistics for AI services
 * @access  Private
 */
router.get('/usage', (req, res, next) => ai_controller_1.aiController.getUsageStats(req, res, next));
/**
 * @route   POST /api/ai/warm-cache
 * @desc    Warm cache with common queries for a project
 * @access  Private
 * @body    { projectId: string }
 */
router.post('/warm-cache', (req, res, next) => ai_controller_1.aiController.warmCache(req, res, next));
/**
 * @route   POST /api/ai/test-connection
 * @desc    Test connection to AI services
 * @access  Private
 */
router.post('/test-connection', (req, res, next) => ai_controller_1.aiController.testConnection(req, res, next));
exports.default = router;
//# sourceMappingURL=ai.routes.js.map