import type { FastifyInstance } from "fastify";

/** What every module folder exports from its index.ts. `routes` is mounted under /api/v2. */
export interface AppModule { name: string; routes: (app: FastifyInstance) => Promise<void> }

declare module "fastify" {
  interface FastifyContextConfig {
    /** V1 endpoints this route replaces, exactly as listed by `npm run parity`, e.g. "GET /api/projects/:projectId". */
    v1?: readonly string[];
  }
}
