import type { FastifyInstance } from "fastify"; import { type ProposalRepo } from "@jgalego/teamapi-core"; export interface ProposalRouteOptions { repo: ProposalRepo; /** GitHub token with write access to the repository. Never read from a config file. */ token: string; } /** * `POST /teams/:id/proposals` — the one write path, and it writes to a pull request. * * Everything else in this API is read-only because the YAML documents in git are the source of * truth, and that is worth keeping. But "keep it in git" has been, in practice, "only engineers * may correct their team's own description", and the result is documents that are wrong in ways * everybody knows about and nobody with the wrong job title can fix. * * A proposal does not change the served graph. It opens a pull request against the repository the * documents came from: reviewed, attributable, CI-checked, declinable. Every property that makes * git-as-source-of-truth worth having survives; the only thing that changes is who can start the * conversation. * * Mounted only when the server was given a repository and a token, because a write path nobody * asked for is a write path nobody is watching. */ export declare function proposalRoutes(app: FastifyInstance, options: ProposalRouteOptions): Promise; //# sourceMappingURL=proposals.d.ts.map