/**
 * Single Source of Truth für Route-Mappings
 * Wird verwendet von:
 * - routes/index.js (Server-Routing)
 * - generate-openapi.js (OpenAPI-Generierung)
 */

module.exports = [
    // Auth API - Session & CSRF Management
    { router: 'auth', prefix: '/auth', file: 'auth.js' },

    // Public API - Öffentlich zugänglich
    { router: 'upload', prefix: '/api', file: 'upload.js' },
    { router: 'download', prefix: '/api', file: 'download.js' },
    { router: 'batchUpload', prefix: '/api', file: 'batchUpload.js' },
    { router: 'groups', prefix: '/api', file: 'groups.js' },
    { router: 'socialMedia', prefix: '/api', file: 'socialMedia.js' },
    
    // Management API - Token-basierter Zugriff
    { router: 'management', prefix: '/api/manage', file: 'management.js' },
    
    // Admin API - Geschützt (Moderation, Logs, Cleanup, Consents)
    // WICHTIG: consent muss VOR admin gemountet werden!
    // Grund: admin.js hat /groups/:groupId, das matched auf /groups/by-consent
    // Express matched Routes in Reihenfolge → spezifischere zuerst!
    { router: 'consent', prefix: '/api/admin', file: 'consent.js' },
    { router: 'admin', prefix: '/api/admin', file: 'admin.js' },
    { router: 'reorder', prefix: '/api/admin', file: 'reorder.js' },
    
    // System API - Interne Wartungsfunktionen
    { router: 'migration', prefix: '/api/system/migration', file: 'migration.js' }
];
