All files / src/lib/api-docs/endpoints/dev metrics.ts

100% Statements 74/74
100% Branches 0/0
100% Functions 0/0
100% Lines 74/74

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 751x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x  
/**
 * Dev Metrics Endpoints
 * Development metrics, burndown charts, and velocity tracking
 */
 
import type { ApiEndpoint } from '@/types/api-docs';
 
export const devMetricsEndpoints: ApiEndpoint[] = [
  {
    id: 'dev-metrics-dashboard',
    method: 'GET',
    path: '/api/dev/metrics/dashboard',
    summary: 'Get metrics dashboard',
    description: 'Returns development metrics dashboard data',
    category: 'dev-metrics',
    requiresAuth: true,
    adminOnly: true,
    parameters: [
      { name: 'projectId', type: 'number', required: false, location: 'query', description: 'Filter by project' },
    ],
    responses: [
      { status: 200, description: 'Dashboard metrics', example: { success: true, data: { openTickets: 25, closedThisWeek: 15, velocity: 42 } } },
    ],
  },
  {
    id: 'dev-metrics-burndown',
    method: 'GET',
    path: '/api/dev/metrics/burndown',
    summary: 'Get burndown chart',
    description: 'Returns sprint burndown chart data',
    category: 'dev-metrics',
    requiresAuth: true,
    adminOnly: true,
    parameters: [
      { name: 'sprintId', type: 'number', required: true, location: 'query', description: 'Sprint ID' },
    ],
    responses: [
      { status: 200, description: 'Burndown data', example: { success: true, data: { ideal: [], actual: [], remaining: 25 } } },
    ],
  },
  {
    id: 'dev-metrics-velocity',
    method: 'GET',
    path: '/api/dev/metrics/velocity',
    summary: 'Get velocity metrics',
    description: 'Returns team velocity metrics over time',
    category: 'dev-metrics',
    requiresAuth: true,
    adminOnly: true,
    parameters: [
      { name: 'sprints', type: 'number', required: false, location: 'query', description: 'Number of sprints to include' },
      { name: 'projectId', type: 'number', required: false, location: 'query', description: 'Filter by project' },
    ],
    responses: [
      { status: 200, description: 'Velocity data' },
    ],
  },
  {
    id: 'dev-reports-workload',
    method: 'GET',
    path: '/api/dev/reports/workload',
    summary: 'Get workload report',
    description: 'Returns team workload distribution report',
    category: 'dev-metrics',
    requiresAuth: true,
    adminOnly: true,
    parameters: [
      { name: 'projectId', type: 'number', required: false, location: 'query', description: 'Filter by project' },
    ],
    responses: [
      { status: 200, description: 'Workload report', example: { success: true, data: { byAssignee: [], unassigned: 5 } } },
    ],
  },
];